-
Notifications
You must be signed in to change notification settings - Fork 730
Description
This issue appears to have been addressed in PR #280
Please verify the current behavior against that PR and fix anything still remaining or regressed.
Problem
In apps/web/src/contextMenuFallback.ts, the fallback context menu closes on outside pointerdown, but the dismissing event may continue to the element underneath.
Because the listener is registered in capture phase, an outside click that is only meant to close the menu can still reach the background target after the menu is dismissed. That can trigger unintended UI actions behind the menu.
What to check
Inspect the fallback context menu implementation in:
apps/web/src/contextMenuFallback.ts
Also verify the renderer path that uses it, including any changes from PR #280:
Expected behavior
When the user clicks outside the fallback context menu:
- the menu should close
- the dismissing click should be consumed
- the underlying UI should not receive that click
At the same time:
- clicking inside the menu should still work normally
- menu items should still resolve correctly
Escapedismissal should still work- menu positioning / visibility behavior should remain correct
- no new double-rendering or extra-layer issues should be introduced
Implementation request
Please make a minimal, targeted fix.
- Inspect
apps/web/src/contextMenuFallback.ts. - Update the outside-click dismissal path so the pointer event is properly consumed before cleanup.
- Preserve existing menu behavior for:
- item clicks
- outside-click close
Escapeclose- menu positioning and visibility
- Add or update a regression test if there is a practical existing place for it.
- Run verification:
bun lintbun typecheck- if repo-wide
bun typecheckstill fails because of unrelated existing issues, note that clearly and also confirm the relevant package typecheck passes - if running tests, use
bun run test, notbun test
Acceptance criteria
- Outside-click dismissal of the fallback context menu does not trigger the underlying UI.
- Existing context menu interactions continue to work.
- The fix is verified with lint/typecheck and any relevant targeted tests.