Close stack when outside area is clicked in host mode#3950
Close stack when outside area is clicked in host mode#3950
Conversation
Preview deployments |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9f06ed4cc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Only handle clicks directly on the inner div or backdrop, not on children | ||
| const target = event.target as HTMLElement; | ||
| if ( | ||
| !target.classList.contains('inner') && |
There was a problem hiding this comment.
Stop using generic
.inner class to detect backdrop clicks
The click guard in handleBackdropClick treats any event target with class inner as a backdrop click, but this handler is attached to the stack container and receives bubbled events from card content. Because card templates can legitimately include an .inner element (for example packages/experiments-realm/transition-tray.gts), clicking inside a card can incorrectly close the top stacked card, which directly violates the new "clicking on a stack card does not close it" behavior for those cards.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I think a way to address this would be to add a modifier to the .inner element so you have a handle for it, then you can compare the element vs the class name.
Screen.Recording.2026-02-04.at.21.46.08.mov