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

Topbar - menu is stuck when mouseout event is triggered in a very specific way #9427

Closed
riisendk opened this issue Dec 1, 2016 · 0 comments · Fixed by #9443
Closed

Topbar - menu is stuck when mouseout event is triggered in a very specific way #9427

riisendk opened this issue Dec 1, 2016 · 0 comments · Fixed by #9443

Comments

@riisendk
Copy link

riisendk commented Dec 1, 2016

How can we reproduce this bug?

  1. Hover over a menu item in the "topbar"
  2. Trigger mouseout event by moving cursor in a 45 degree (or so) angel to the right (see video for exact direction)

What did you expect to happen?

The menu should disappear.

What happened instead?

The menu is stuck.

It appears that the bug has something to do with this line of code in foundation.dropdownMenu.js:

var somethingToClose = $toClose.hasClass('is-active') || $toClose.find('.is-active').length > 0;

The is-active class is not available thus resulting in the somethingToClose variable being false even though the menu is still visible.

Test case:

Codepen and video that recreates the issue:

foundation-topbar
Edited by @ncoden 04/12/16: add GIF

ncoden added a commit to ncoden/foundation-sites that referenced this issue Dec 4, 2016
Fix foundation#9427

The hide delay of the visible dropdown is replaced by the delays of the
lastly triggered dropdown, so the hide function is never called on the
currently visible dropdown.

Remember and cancel the delay inside each element. So a visible
dropdown remember its hide delay even if several dropdown must be
hidden.
kball added a commit that referenced this issue Dec 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants