Fix #69: dismiss More-options menu when the user starts dragging a row#70
Open
lucasmendes-design wants to merge 1 commit into
Open
Fix #69: dismiss More-options menu when the user starts dragging a row#70lucasmendes-design wants to merge 1 commit into
lucasmendes-design wants to merge 1 commit into
Conversation
The `click`-phase handler in move-menu.js only fires on a full click — by then a press-and-hold drag has already taken hold of a row, so the floating menu stays anchored at its `position: fixed` coordinates while the row moves out from under it. Add a `pointerdown` listener in the capture phase that closes the open menu whenever the pointerdown lands outside the menu and the three-dot trigger. Registered in capture so it fires before drag-drop.js's own `pointerdown` handler on the sidebar — menu closes first, then the drag starts cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #69. Linear: DES-660. Off
trunkdirectly — no stack dependencies.Summary
The More-options (three-dot) menu in customize mode stayed open while the user dragged a row, because
move-menu.jsonly listened onclickto dismiss. A press-and-hold drag never produces a click — by the timepointerupfires the row has already moved, and the floating menu remains anchored at itsposition: fixedcoordinates next to whatever now sits in the original spot.The fix
One file,
src/customizer/move-menu.js. NewonPointerDownhandler that closes the open menu whenever apointerdownlands outside the menu and outside the three-dot trigger. Registered withcapture: trueso it fires beforedrag-drop.js's ownpointerdownhandler on the sidebar — the menu closes first, then the drag starts cleanly.Paired with the existing
clickandkeydownhandlers so all dismissal paths are covered (click outside, drag start, Escape, menu-action click).Manual verification
Local Studio site (PHP 8.4 / WP 6.9.4, SQLite) with the blueprint plugin set, in customize mode.
Tests
JS-only behaviour. No existing test covers the cross-module pointerdown ordering (it's an integration concern between
move-menu.jsanddrag-drop.js), so this PR doesn't add one. CI gates the rest of the suite.🤖 Generated with Claude Code