Skip to content

Fix Chrome click-to-sort: ignore phantom zero-movement mousemove events#3040

Merged
xirvik merged 1 commit intoNovik:developfrom
xirvik:fix/chrome-sort-phantom-mousemove
Apr 22, 2026
Merged

Fix Chrome click-to-sort: ignore phantom zero-movement mousemove events#3040
xirvik merged 1 commit intoNovik:developfrom
xirvik:fix/chrome-sort-phantom-mousemove

Conversation

@xirvik
Copy link
Copy Markdown
Collaborator

@xirvik xirvik commented Apr 22, 2026

Chrome fires mousemove events on mousedown/mouseup even when the mouse hasn't physically moved (movementX === 0, movementY === 0). This caused the DnD handler's onRun callback to set isMoving = true on every click, triggering the column drag path instead of the sort path.

Add a guard to ignore zero-movement events before setting isMoving.

Previously fixed in PR #1637 but lost during the DnD class refactor.

Fixes #3001

Note: Couldn't repro, so maybe Chrome already fixed the issue on their end, but the change is harmless so why not.

Chrome fires mousemove events on mousedown/mouseup even when the mouse
has not moved (movementX === 0, movementY === 0). This caused the DnD
handler to set isMoving=true on every click, triggering column drag
instead of sort. Guard against zero-movement events in onRun callback.

Previously fixed in PR Novik#1637 but lost during DnD class refactor.

Fixes Novik#3001
@xirvik xirvik merged commit 04025c4 into Novik:develop Apr 22, 2026
@xirvik xirvik deleted the fix/chrome-sort-phantom-mousemove branch April 22, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant