Skip to content

Grid: pressing Escape while dragging a column over the group-by area groups by that column #17745

Open

Description

@ivanvpetrov

Description

When a column is dragged over the group-by area and the user presses Escape, the column move should be cancelled. Instead, the grid is grouped by that column, as if the column had been dropped there.

Cause: on Escape, IgxColumnMovingDragDirective.cancelMove() sets IgxColumnMovingService.cancelDrop = true and then calls onPointerUp(). That still dispatches a drop to the drop area under the pointer. Only IgxColumnMovingDropDirective (column headers) checks cancelDrop; the group-by area's onDragDrop doesn't, so it groups by the column.

cancelDrop is also only reset by IgxColumnMovingDropDirective. After a cancelled drag over the group-by area it stays true, so the next real column drop on a header is probably ignored once (not verified).

Suggested fix: make cancelMove() use igxDrag's new cancel API (cancelDrag(), #17744) instead of onPointerUp(), so no drop is dispatched to any drop area, and reset the column-moving state there.

Not yet checked: whether the tree grid group-by area behaves the same way.

Framework

Angular

Angular Version

22.2.0

Ignite UI for Angular Version

22.2.0

Component / Area

Grid

Browser

Chrome

Operating System

Windows

Command Not Working

Steps to Reproduce

  1. Run the demos (npm start) and open "Grid Column Moving" (/gridColumnMoving).
    In your own app: an igx-grid with [moving]="true" and at least one column with [groupable]="true", so the group-by area is shown above the headers.
  2. Press the mouse on a column header (e.g. "CompanyName") and start dragging it. Keep the button pressed.
  3. Move the drag ghost over the group-by area above the headers ("Drag a column header and drop it here to group by that column").
  4. Without releasing the mouse button, press Escape.

Actual Result

The drag ghost disappears and the grid is grouped by the dragged column.

Expected Result

The column move is cancelled. The grid isn't grouped, the column stays in its original position, and the next column drag and drop works normally.

Reproduction URL

No response

Attachments

No response

Activity

  1. added theissue type on Oct 7, 2026
  2. self-assigned this
    on Oct 12, 2026
  3. ivanvpetrov commented on Oct 12, 2026

    @ivanvpetrov
    ContributorAuthor

    Fixing this separately will later conflict wit the cancel functionality of #17744 that's currently been reviewed.
    So we will postpone this fix until it's merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions