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
Expected behavior
When a button has a tooltip and launches a modal, the tooltip should not be visible when the modal is closed
Actual behavior
When there is a button that has a tooltip that also has a click handler to launch a modal, after dismissing the modal the tooltip is still visible until either clicking elsewhere on the screen or until a new tooltip is shown
Steps to reproduce the issue
Have a button element that has a tooltip and also opens a modal on click
Hover mouse over button, observe the tooltip is shown
Click the button to open the modal
Close the modal
Observe that the tooltip is now shown, regardless of where the mouse is located
daneah
changed the title
Tootip: Tooltip is still visible after a modal triggered by same UI element is dismissed
Tooltip: Still visible after a modal triggered by same UI element is dismissed
Dec 11, 2024
@JimFeather Thanks for reporting! I think this behavior is due to the fact that, when the modal is closed, we must return focus to an element on the page for accessibility reasons. The most sensible item to return focus to is typically the element that triggered the modal to open, and so the button in this case receives focus and therefore re-opens the tooltip.
This isn't to say this is an optimal experience, but does mean it's kind of..."working as designed" at least. I think we may have had some past discussion about this scenario and what to do about it (@ymouzakis does this ring a bell?), so will need to revisit here a bit.
Expected behavior
When a button has a tooltip and launches a modal, the tooltip should not be visible when the modal is closed
Actual behavior
When there is a button that has a tooltip that also has a click handler to launch a modal, after dismissing the modal the tooltip is still visible until either clicking elsewhere on the screen or until a new tooltip is shown
Steps to reproduce the issue
Screenshots or code
Pharos version
14.5.1
Your environment
Additional information
Add any additional notes or further context about the issue here, including any known workarounds.
The text was updated successfully, but these errors were encountered: