Skip to content

fix: prevent tooltip click and mousedown from bubbling to target - #10268

Merged
web-padawan merged 2 commits into
mainfrom
fix/tooltip-overlay-stop-click
Sep 30, 2025
Merged

web-padawan merged 2 commits into
mainfrom
fix/tooltip-overlay-stop-click

Conversation

@web-padawan

Copy link
Copy Markdown
Member

Description

Part of #10255

Fixes the finding from #10255 (comment)

Type of change

  • Bugfix

__onOverlayClick(event) {
// Prevent click listeners from being called when
// the tooltip is slotted into the target element
event.stopPropagation();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The button still triggers its click animation when clicking the tooltip. Maybe it would be good to fix that as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed. Changed to stop propagation for mousedown too - it's a better fix than the previous one. The active state used by click animation is set on mousedown event in ActiveMixin so stopping it makes sense.

@sonarqubecloud

Copy link
Copy Markdown

@web-padawan web-padawan changed the title fix: prevent tooltip overlay click from bubbling to target fix: prevent tooltip click and mousedown from bubbling to target Sep 30, 2025
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 25.0.0-alpha14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants