fix(dashboards): Stop widget header action clicks from bubbling#116096
Open
skaasten wants to merge 2 commits into
Open
fix(dashboards): Stop widget header action clicks from bubbling#116096skaasten wants to merge 2 commits into
skaasten wants to merge 2 commits into
Conversation
…awer On prebuilt dashboards (e.g. Web Vitals), widgets that expose a slideout drawer also rendered the full-screen view button. Clicking the expand icon opened the widget viewer modal while the same click bubbled to the widget wrapper and opened the slideout drawer, leaving both visible at once. Pass `disableFullscreen: hasSlideout` to `WidgetCard` so the expand icon is omitted when a slideout drawer is configured, leaving the drawer as the only entry point. Fixes DAIN-1684
Contributor
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.63% |
nikkikapadia
approved these changes
May 22, 2026
The widget header action buttons (full-screen view, copy URL, single custom action) did not stop click event propagation, so clicking them also fired the parent wrapper's onClick. On prebuilt dashboards like Web Vitals that use the wrapper click to open a slideout drawer, this caused the full-screen modal and the slideout drawer to open simultaneously and overlap. Stop propagation on each header button so the wrapper's click target remains the widget body. Revert the previous `disableFullscreen` workaround now that the root cause is addressed. Fixes DAIN-1684
DominikB2014
approved these changes
May 22, 2026
nikkikapadia
approved these changes
May 22, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stop click events from bubbling out of widget header action buttons (full-screen view, copy URL).
On prebuilt dashboards like Web Vitals that wire a slideout drawer to the wrapper's
onClick, the bubble caused the full-screen modal and the slideout drawer to open from a single click and overlap.Root cause
The header buttons in
widgetFrame.tsxdidn'te.stopPropagation(), so a click on the expand icon fired the button'sonFullScreenViewClickand bubbled up toGridWidgetWrapper'sonClickinsortableWidget.tsx, which opens the slideout. Same bubble exists for the Copy URL button and any single custom action.Fix
Each header action button now stops propagation before invoking its handler. The wrapper's click target stays the widget body, so the slideout only opens when the user actually clicks into the widget body — not when they interact with a header button.
Fixes DAIN-1684