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

Submenu hover bugs #523

Closed
tim-nz opened this issue Apr 9, 2017 · 4 comments
Closed

Submenu hover bugs #523

tim-nz opened this issue Apr 9, 2017 · 4 comments

Comments

@tim-nz
Copy link

tim-nz commented Apr 9, 2017

There are three issues here, but I suspect they're related. They all involve menu items not highlighting and submenus. All issues can be observed in the Submenus demo page, and I've tried it with the latest versions of Firefox, Chrome, and Edge on Windows - all show the same behaviour. They can be a bit tricky to explain, so bear with me.

  1. I'll start off with a bug that's cropped up before (An item should remain highlighted as long as its associated submenu is being displayed #387), and was apparently fixed, but is now observable on the demo page. If a user opens a submenu then moves the mouse off all menus, the submenu title doesn't stay highlighted, even though the the submenu stays open. Example:
    issue-1
    This isn't normal behaviour for context menus, but doesn't actually concern me much. I'm mentioning it because I suspect it has something to do with the next issue.

  2. If a user moves their mouse off all menus then moves it quickly into a submenu item without crossing either the root menu or the padding at the top or bottom of the submenu, the submenu item will highlight, but not the title of the submenu. Example:
    issue-2
    Different items in the submenu will highlight as you move over them, but the menu title will not highlight unless you move the mouse off the submenu and then move it back over the submenu slowly (if you do it quickly the submenu title remains unhighlighted), or if you move the mouse back onto the root menu.
    This might seem like an issue that wouldn't often arise, but a user is quite likely to do this, especially when the submenu is the last item of the root menu. Say the user wanted to select "golf" from the "Other group" on the demo page. They are likely to move the mouse in a straight line from the "Other group" title to the "golf" item, which means they will move diagonally across an area off the menu and this issue will arise. It happens to me all the time while I'm testing the menu.

  3. This is the hardest one to replicate on the demo page, but the issue commonly arises if there's a submenu followed by a normal item in the root menu. If the user opens the submenu then moves the mouse quickly across any part of the root menu that isn't the submenu title, the first submenu item they arrive at won't highlight. Example:
    no-submenu-item-hover
    This doesn't happen if they move across a title of another submenu or off the root menu, or with submenus inside submenus, which is why it's hard to replicate on the demo page. But it can be replicated by moving quickly from "Other group" to "foxtrot" while crossing the padding of the root menu but not leaving the root menu itself (it's tricky!).
    However, as mentioned earlier, it happens all the time if a submenu in the root menu is followed by a normal item, for the same reason as the previous issue - users are likely to move diagonally from the submenu title to their desired submenu item. And again, it happens to me all the time when testing.
    It sorts itself out when moving to another item, but the user may not do that, and either way it makes for a clunky user experience.

Hopefully all that makes sense. Let me know if any of this needs clarifying. By the way, thanks to the developers. Aside from these minor bugs, I love this plugin.

@mustanggb
Copy link

I can replicate the first two of these on Chrome 57, as you say the third is hard to replicate probably I just wasn't patient enough.

@bbrala
Copy link
Member

bbrala commented Apr 24, 2017

Thanks for the extensive report. It seems the issue boils down to the mouseout event on the main menu. I think i need to make a check that does something with opened submenu's so its parent isn't allow its mouseout. I'll have a look in the code if i can do this without to much problems.

@bbrala
Copy link
Member

bbrala commented Apr 24, 2017

I cant really reproduce 3, but 1 and 2 without a problem.

Problem 1 is hard to fix, since being more aggresive on closing the menu might be a bit nasty when you are slow pointing your mouse.

Problem 2 i have made a little fix that applies hover state on the parent of the submenu also.

@bbrala
Copy link
Member

bbrala commented Apr 24, 2017

Hmm i reproduced 3, but that really only happens when insanely quick so that mouseenter is not really triggered. It is so hard to do, im not going to fix that :)

bbrala added a commit that referenced this issue Apr 24, 2017
@bbrala bbrala closed this as completed Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants