| … | … | @@ -118,6 +118,7 @@ export function PreviewPanelShell(props: { | |
| 118 | 118 | return ( | |
| 119 | 119 | <div | |
| 120 | 120 | ref={hostRef} | |
| 121 | + | inert={collapsible && !open} | |
🟡 Medium preview/PreviewPanelShell.tsx:121
Collapsing the panel leaves the open Add panel surface menu focusable and operable, so its actions remain available while the right panel is hidden. inert only covers this shell's descendants; MenuPrimitive.Portal renders the menu outside it, and rightPanel.toggle does not reset addSurfaceMenuOpen. Close portaled overlays when open becomes false or include them in the inert scope.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/web/src/components/preview/PreviewPanelShell.tsx around line 121: |
| 2 | |
| 3 | Collapsing the panel leaves the open Add panel surface menu focusable and operable, so its actions remain available while the right panel is hidden. `inert` only covers this shell's descendants; `MenuPrimitive.Portal` renders the menu outside it, and `rightPanel.toggle` does not reset `addSurfaceMenuOpen`. Close portaled overlays when `open` becomes false or include them in the inert scope. |
Fixed since this comment: RightPanelTabs now closes the Add panel menu when the inline panel collapses (open === false), so the portaled menu can no longer be focused or operated while the panel is hidden. PreviewPanelShell.a11y.test.tsx → "collapsed panel portaled menu" covers it: the menu closes on collapse and does not reopen with the panel. Real-client capture is in the PR body.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
Update: main now covers this. #15686 (7202ba6660) closes the Add panel menu whenever open === false and only renders it while the panel is open. This PR's own guard and its tests were removed in 1ae51a5afd after merging main, so the portaled menu is handled by main's code.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.