KEMBAR78
fix: prevent tooltip click and mousedown from bubbling to target by web-padawan · Pull Request #10268 · vaadin/web-components · GitHub
Skip to content

Conversation

@web-padawan
Copy link
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
Contributor

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
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

@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
@web-padawan web-padawan merged commit a74db59 into main Sep 30, 2025
9 checks passed
@web-padawan web-padawan deleted the fix/tooltip-overlay-stop-click branch September 30, 2025 12:36
@vaadin-bot
Copy link
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