fix(logs): Prevent cell action menu clicks from toggling row visibility#111717
Merged
JoshuaKGoldberg merged 2 commits intomasterfrom Mar 27, 2026
Merged
Conversation
9b419cf to
6011b9d
Compare
Clicking "Copy to clipboard" (or any item) in the ellipsis dropdown menu on a log row also toggled the row's expanded/collapsed state. The dropdown menu renders in a React portal, but React propagates synthetic events from portals through the component tree. The row's onPointerUp handler checked isInsideButton(event.target) to skip the toggle, but portal menu items render as <li role="menuitem">, which didn't match the button check. Add a DOM containment guard: verify the event target is actually inside the row element before toggling. Portal-originating events fail this check since their DOM is in a separate subtree. Refs LOGS-638 Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> Made-with: Cursor
6011b9d to
bc25c6d
Compare
nsdeschenes
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The dropdown menu renders in a React portal, so its DOM lives outside the row. This adds a DOM containment check: before toggling, verify
event.currentTarget.contains(event.target). Portal-originating events fail this check since their DOM subtree is separate from the row's.Fixes LOGS-638
Made with Cursor