bindHover almost working
See original GitHub issueI am facing a problem with the bindHover
hook, it all works on enter but when I leave the MenuItem
I hovered on, the Menu
does not automatically close:
I am using the following versions of Material-UI
:
- “@material-ui/core”: “^4.9.14”,
- “@material-ui/icons”: “^4.9.1”,
- “@material-ui/styles”: “^4.9.14”
Might be related to https://github.com/jcoreio/material-ui-popup-state/issues/9.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
bindHover on menu #3 - jcoreio/material-ui-popup-state - GitHub
Note: the fix only works if you pass a popupId prop to PopupState , because it needs popupId to find your submenu component....
Read more >Why the first event "hover" not working? - Stack Overflow
p.s. The following code is working. Because there are not only one set, I should use loop "for". $("#Map area:eq(0)" ...
Read more >getcontentanchorel | The AI Search Engine You Control
Created almost 4 years ago. 20. hey there I'm trying to use bindHover with bindMenu but when mouse moves on sub menu list...
Read more >aurelia/Discuss - Gitter
I've got it somewhat working, but I installed core-js types using tsd install core-js and kept seeing errors pertaining to ArrayLike. @marwijn ...
Read more >Extension talk:MsUpload - MediaWiki
VisualEditor already has a simple way to upload files. There're no plans to make MsUpload work with the VisualEditor.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Would it be possible to make a codesandbox to reproduce your issue? Here’s the Material-UI codesandbox template: https://codesandbox.io/s/material-ui-issue-dh2yh?file=/src/Demo.js
In OP’s case it seemed to be caused by the menu items being unintentionally remounted on each render (according to a code sample in a different issue), so that’s one thing to check for.
Oh man, I completely forgot about the workarounds I had created for hover cases… 😂
In this case you need to
or
This is because Material-UI
Modal
has a bad design where it blocks all pointer events from getting through to any other components on the screen (therefore the hovered element never receives a mouse leave event), requiring a messy workaround.I’ll fix the examples in the README and make this clearer…sorry for the confusion!