-
Notifications
You must be signed in to change notification settings - Fork 79
Description
Actual Behavior
If a tooltip is open inside a container when a display: none
style is set on the container, the tooltip never emits calciteTooltipBeforeClose
and calciteTooltipClose
events.
Expected Behavior
If a tooltip is open inside a container when a display: none
style is set on the container, the tooltip still emits calciteTooltipBeforeClose
and calciteTooltipClose
events.
Reproduction Sample
https://codepen.io/nwhittaker-esri/pen/bGjRNEW
Reproduction Steps
- Visit the sample and open the console.
- Mouse into the red-bordered box and see the "Hover for Tooltip" text appear.
- Mouse onto the "Hover for Tooltip" text and wait for the tooltip to open.
- Quickly mouse out of the red-bordered box and wait a few seconds. Notice that none of the tooltip's close events are logged to the console.
Reproduction Version
next.721
Relevant Info
IIRC, transitionstart
and transitionend
events don't fire if the element doesn't have display which may explain why the tooltip isn't emitting its close events.
Regression?
No response
Impact
For performance reasons, the Field Maps web-app has some logic that remove a tooltip after it closes. In some cases, those tooltips appear alongside buttons that gain/lose display depending on whether a containing element is being hovered.
The current solution is to wait a hard-coded amount of time before removing the tooltip, but waiting for the event would be cleaner and easier to maintain.
Esri team
ArcGIS Field Apps