-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Prevent submenus from closing if mouse leaves and re-enters within leaveDelay ms #300
Conversation
…rs within leaveDelay ms
I've done some manual testing in the demo environment ( This fix works well with Disclosure Menus, Menubars, and Treeviews with single and multi-level menus. It does not work for Top Link Disclosure Menus though. Top Link Disclosure Menus overwrite the base Tests will also need to be updated/added to to check for this case. |
Thank you, Nick! I should have some time to tackle this next week. |
@synthetiv I have some time this week to work on the project. Are you still planning on implementing this fix? Or do you want me to hop on it as well? |
I've been looking into this and I've run into a handful of interesting cases that make this a little bit of a bigger issue than expected.
We'll need to get all those working for all menus and then figure out all the automated tests to write for those... Just a bit more complex than I immediately thought. |
Ah, thanks for picking this thread back up. I've only had time to address this issue for the specific use case where I observed it; back in March I began writing some tests for the other menu types but never got around to finishing them, and it sounds like you've found a few more specific scenarios that need testing. If/when I do have a moment to dig in further, I will let you know – sorry I haven't so far. |
@synthetiv no worries. I'll be puttering away at this as well (I have a MR against your branch with changes I'm making). |
I was discussing this with a colleague on Friday and we think there might be a need to move the timeout functions to be owned by the toggles themselves. We might need to track which toggle is opening/closing in which case it makes more sense for the toggles to own the events entirely. I'll need to play around with this a little more though. |
Ok I have it all worked out I think. I moved _hoverTimeout to the menu items. This allows each individual menu item to control it's own timeouts, which looks like it works excellently.
This is going to be a breaking change, so it'll need to be a new major. The following still need to be done:
|
@synthetiv Are you able to give me commit privileges to your repo? It'll make it easier to run the automated tests. |
Moving all work to #314 |
Closing this. I pulled all the changes made here into the other MR and it has been merged. |
Description
This fixes #299, at least for my use case, by storing and clearing the leaveDelay timeout that is set when the user's cursor exits a submenu.
This has not yet been tested with second-level submenus (i.e. sub-submenus).
Related Issues
#299