Repository navigation
fix: keep the editor gutter inert under open menus - #662
Merged
Merged
Conversation
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.
Summary
The insertion gutter answered the pointer through open menus in two ways:
mousemovethat works from gutter geometry alone, so pointing at a menu item above a gutter showed the button and its line beneath the menu. The heading fold marker's hover is tracked the same way and showed through menus too.z-index, while the gutter layer sat atz-20above it. Clicking the gutter below an open menu closed the menu and, in the same click, opened block insertion; block handles could be pressed the same way.The gutter layer now stacks at
z-0. It is appended to<body>when the editor mounts, so menu portals added later, backdrop included, paint above it and keep the press. Nothing that overlaps the gutter relied onz-20: the titlebar and search panel already stack above it, and the root gutter sits inside the editor's own inline padding.For hover,
utils/editorSurface.tshit-tests what lies beneath the editor's overlay controls. The insertion button and the fold marker respond only when that element belongs to the editor, which generalizes the fold-marker hit test the gutter already used. Both trackers also listen tomouseover, so a menu opening under a stationary pointer hides the button without waiting for movement.The specification records that a covering menu or popup keeps the pointer, and the changelog records the fix.
Related Issue
Closes #658
Verification
blockSelectionInteraction.test.tscovers the insertion button hiding while a covering element lies beneath the pointer, including beneath the button itself, and working again once it is gone.headingFold.test.tscovers the fold marker staying hidden under a covering element and returning when the element is removed, with the gutter's own controls skipped. Both tests fail without the plugin changes.pnpm check:frontendpassed.Manually verified in headless Edge 154 on Windows 11 over CDP, with the editor mounted at a temporary Vite route beside a real Base UI menubar menu overlapping the gutter:
A desktop E2E scenario in
block-selection.spec.tshides the sidebar so the File menu overlaps the gutter, then covers hover, a press below the menu, and restored insertion after dismissal.Not verified: the E2E scenario was not run locally; CI runs it. The Tauri window itself was not exercised.
Notes
<body>before a menu opens. If the editor remounted while a menu was open, its layer would sit above that menu's backdrop until the menu closed; hover would still stay suppressed.