-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(explore-attr-breakdowns): Adding chart tooltip actions #104149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
static/app/views/explore/hooks/useAttributeBreakdownsTooltip.tsx
Outdated
Show resolved
Hide resolved
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Outdated
Show resolved
Hide resolved
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/cohortComparisonChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/cohortComparisonChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/cohortComparisonChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/cohortComparisonChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/cohortComparisonChart.tsx
Fixed
Show fixed
Hide fixed
|
|
||
| const handleClickActions = (event: MouseEvent) => { | ||
| event.preventDefault(); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Unconditional preventDefault blocks all document clicks
The handleClickActions event handler calls event.preventDefault() unconditionally at line 105, before checking if the click target has tooltip action attributes. Since this handler is attached to document when the tooltip is frozen, it prevents the default behavior for ALL clicks anywhere on the page—not just clicks on tooltip actions. This could break link navigation, form submissions, checkbox toggling, and other interactive elements outside the chart area while the tooltip is in its frozen state. The event.preventDefault() call should be moved inside the if (action && value && key) conditional block.
The behaviour that we are going for is:
Screen.Recording.2025-11-30.at.3.54.20.PM.mov