You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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;
}
Reopening because we'll solve this a different way
reverting - #4535
After a team discussion, we've decided to address this in all of our portalled components using something like facebook/react#11387 (comment)
and provide guidance in our FAQ on how to ignore events that come through a portal.
馃悰 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: