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
Just ran into a fairly nasty bug using useTooltip that I actually tracked down to a react problem, but thought it would be good to include in the docs.
In short: Disabled buttons in react fire mouseenter events (will open the tooltip) but they do NOT fire mouseleave events (the tooltip never goes away!) This can be fixed by applying pointer-events: none; to the disabled button.
Just ran into a fairly nasty bug using
useTooltip
that I actually tracked down to a react problem, but thought it would be good to include in the docs.In short: Disabled buttons in react fire mouseenter events (will open the tooltip) but they do NOT fire mouseleave events (the tooltip never goes away!) This can be fixed by applying
pointer-events: none;
to the disabled button.Here's a codesandbox illustrating the issue (and solution)
The relevant react issue: facebook/react#4251
An example of react-bootstrap documenting this in their tooltip documentation: https://react-bootstrap.github.io/components/overlays/#overlays-disabled
Just thought it would be good to call this out so nobody else has to get very confused when their tooltips become permanent...
The text was updated successfully, but these errors were encountered: