-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Clicks on tooltips are propagated to parent components #4480
Comments
Reopening because we'll solve this a different way
|
Hi @snowystinger, just wondering if the team has an idea of when this fix will be worked on? We're currently looking at utilizing the Thanks |
Unfortunately, it doesn't fit in the current priorities for the team. If you need it soon, the fastest way to get it discussed/reviewed is to submit a PR. This has the benefit that you can use tools like patch-package in the meantime so that it will eventually match. |
🐛 Bug Report
Tooltip click propagates to parent div. It's possible to click it by mousing over where the arrow is and onto the tooltip.
🤔 Expected Behavior
Clicking tooltip shouldn't propagate to parent divs.
😯 Current Behavior
When there's a tooltip trigger within a parent div, clicking on the tooltip propagates the click event to the parent div. This effectively makes it click whatever's underneath it.
💁 Possible Solution
#4479
🔦 Context
Currently in our app we have to do the following:
const handleOverlayClick = (e: React.MouseEvent) => {
resetLiveEdit(selectedField?.id);
if ((e.target as Element).className?.match(/^spectrum-Tooltip/)) {
return;
}
This is clearly not ideal.
💻 Code Sample
Left tooltip as always open, but it's easily reproducible with normal hover open behavior.
https://codesandbox.io/s/tooltip-j54xrm?file=/src/App.js
🌍 Your Environment
🧢 Your Company/Team
🕷 Tracking Issue (optional)
The text was updated successfully, but these errors were encountered: