Skip to content

Fix table sorting in chrome.#1637

Merged
Novik merged 1 commit intoNovik:masterfrom
ozatomic:master
Jan 12, 2018
Merged

Fix table sorting in chrome.#1637
Novik merged 1 commit intoNovik:masterfrom
ozatomic:master

Conversation

@ozatomic
Copy link
Copy Markdown
Contributor

@ozatomic ozatomic commented Jan 12, 2018

Chrome has a different behavior then other browsers were the click event also triggers the mouseMove event.

This is just a little work around so that the event is not fired and you can sort columns consistently.

Issue:
#1195

@Novik Novik merged commit d13e4f4 into Novik:master Jan 12, 2018
xirvik added a commit that referenced this pull request Apr 22, 2026
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 #1637 but lost during DnD class refactor.

Fixes #3001
xirvik added a commit that referenced this pull request 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.
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.

2 participants