Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip hide on disabled input doesn't work #41

Closed
denisborovikov opened this issue Jan 22, 2019 · 8 comments
Closed

Tooltip hide on disabled input doesn't work #41

denisborovikov opened this issue Jan 22, 2019 · 8 comments

Comments

@denisborovikov
Copy link
Collaborator

denisborovikov commented Jan 22, 2019

If the trigger element is a disabled button, the tooltip isn't hiding on mouse leave.

Demo: https://codesandbox.io/s/61yv95m533

hover

@mohsinulhaq
Copy link
Owner

This is a known issue with React on Chrome and Safari, where mouseenter is triggered on disabled elements but not mouseleave. This however, should work fine in Firefox.

Ref: facebook/react#4251

@mohsinulhaq mohsinulhaq pinned this issue Jan 22, 2019
@stale stale bot added the stale label Mar 23, 2019
Repository owner deleted a comment from stale bot Mar 23, 2019
@stale stale bot removed the stale label Mar 23, 2019
@denisborovikov
Copy link
Collaborator Author

denisborovikov commented Feb 26, 2020

Seems it's going to be fixed in coming React 16.13.0

@mohsinulhaq
Copy link
Owner

@denisborovikov yeah, I had asked here facebook/react#17675 (comment) just to be sure it's the exact same issue.

@mohsinulhaq
Copy link
Owner

They have now closed the issue. I guess we can close this one as well, as I can see that your sandbox is working as expected after the upgrade.

@denisborovikov
Copy link
Collaborator Author

denisborovikov commented Feb 27, 2020

Huh, now it means we can't even have a tooltip on a disabled button. onMouseEnter just doesn't fire.

@mohsinulhaq
Copy link
Owner

That's what should happen according to HTML spec. If you still want it, you can wrap the button with a div.

@denisborovikov
Copy link
Collaborator Author

Sure, or use a fake button as well. Did know it's according to spec.

@mohsinulhaq mohsinulhaq unpinned this issue Feb 28, 2020
@aigoncharov
Copy link

We had the same problem at hazelcast/hive#58. We ended up using a child component inside of the button as the tooltip trigger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants