Skip to content

Fix Menu's Appearing Behind Home Content#394

Open
PauloMFJ wants to merge 5 commits into
datacommonsorg:mainfrom
madebypxlp:paulo/fix-menu-appearing-behind
Open

Fix Menu's Appearing Behind Home Content#394
PauloMFJ wants to merge 5 commits into
datacommonsorg:mainfrom
madebypxlp:paulo/fix-menu-appearing-behind

Conversation

@PauloMFJ

@PauloMFJ PauloMFJ commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Overview

Implemented Portal element to fix open Menu showing behind home content.

Fixed focus events in InFrontOfCanvas getting consumed by tldraw. To do so implemented new capture config option on useKeyDown.

Re-ordered zoom options:
image

Tickets:
image
image

@PauloMFJ PauloMFJ self-assigned this Jul 6, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new Portal primitive to lift canvas elements above tldraw's stacking context, refactors the Menu component, and updates the useFocusTrap and useKeydown hooks to improve keyboard navigation. Key feedback includes: avoiding a global capture-phase listener in useKeydown to prevent breaking event propagation, optimizing the Portal component to prevent DOM recreation and state loss on className changes, retaining the focus trap in the Menu component for accessibility, and refining the tabbable elements selector in useFocusTrap to support all non-negative tab indices.

Comment thread dataweaver/apps/web/src/hooks/use_keydown.ts Outdated
Comment thread dataweaver/apps/web/src/components/primitives/portal.tsx
Comment thread dataweaver/apps/web/src/components/elements/menu.tsx
Comment thread dataweaver/apps/web/src/components/elements/menu.tsx
Comment thread dataweaver/apps/web/src/hooks/use_focus_trap.ts
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