Skip to content

Close stack when outside area is clicked in host mode#3950

Open
FadhlanR wants to merge 1 commit intomainfrom
cs-10139-close-stack-when-outside-area-is-clicked
Open

Close stack when outside area is clicked in host mode#3950
FadhlanR wants to merge 1 commit intomainfrom
cs-10139-close-stack-when-outside-area-is-clicked

Conversation

@FadhlanR
Copy link
Contributor

@FadhlanR FadhlanR commented Feb 5, 2026

Screen.Recording.2026-02-04.at.21.46.08.mov

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Preview deployments

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Host Test Results

    1 files  ±0      1 suites  ±0   1h 43m 22s ⏱️ -27s
1 947 tests +3  1 930 ✅ +3  17 💤 ±0  0 ❌ ±0 
1 962 runs  +3  1 945 ✅ +3  17 💤 ±0  0 ❌ ±0 

Results for commit e9f06ed. ± Comparison against base commit 942245e.

@FadhlanR FadhlanR marked this pull request as ready for review February 5, 2026 05:44
@FadhlanR FadhlanR requested a review from a team February 5, 2026 05:44
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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') &&

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

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.

2 participants