Skip to content

IgxGridSelectionService.generateRange crashes on drag-select released outside grid #17335

@MonikaKirkova

Description

@MonikaKirkova

Description

IgxGridSelectionService.generateRange throws when state.node is null. This occurs when a keyboard navigation event fires during an active pointer drag-select, which calls initPointerState() and nulls pointerState.node. If the pointer is then released outside the grid, pointerOriginHandler invokes pointerUp → generateRange(node, this.pointerState), which destructures state.node without a null check.

Framework

Angular

Angular Version

21.2

Ignite UI for Angular Version

21.2

Component / Area

Grid

Browser

Chrome

Operating System

No response

Command Not Working

Steps to Reproduce

  1. Render an igx-grid with cell selection
  2. Click and hold on a data cell and begin a drag-select
  3. Drag the pointer outside the grid boundary
  4. While still holding the mouse button, press any navigation key (Arrow, Home, etc.)
  5. Release the mouse button
  6. Observe the unhandled TypeError in the console

Actual Result

This error is displayed in the console: TypeError: Cannot destructure property 'row' of 'state.node' as it is null.

Expected Result

There should be no error

Reproduction URL

https://stackblitz.com/edit/hqa1n52c?file=src%2Fapp%2Fgrid%2Fgrid-cellSelection-sample%2Fgrid-cellSelection.component.html

Attachments

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions