-
-
Notifications
You must be signed in to change notification settings - Fork 537
Description
Describe the bug
If I add a tooltip to an element within a NavLink (i.e. a link to another route within a React app) and I tap the element, I go to the linked route (as expected) but the tooltip then appears in the top left corner of the screen. Presumably in the top left as the element that triggered the tooltip is no longer on the page.
It'd probably be good if tooltips didn't show if the trigger element no longer exists on the page. Or if tooltips disappeared after navigating to a new page. Or if there was a manual way to instantly hide all tooltips, that we could implement ourselves after navigating to a new page. Or perhaps if there was an optional attribute to disable a tooltip on touch, if we know it's inside of a link.
Essentially I want the tooltip on hover on desktop, but on touch screens where hover doesn't exist, I simply want the NavLink to work without triggering the tooltip.
Thanks for any help.
Version of Package
v5.8.3
To Reproduce
Add tooltip attributes to a div or other element within a NavLink.
Expected behavior
I would expect the tooltip to simply not show if instantly navigating to a new route after tapping an element.
Smartphone (please complete the following information if possible or delete this section):
- Device: iPhone 12
- OS: iOS 16.3.1
- Browser: Safari
- Frameworks: react 18.2.0, react-router-dom 5.3.4