marioloncarek / megamenu-js

Last responsive megamenu you'll ever need
MIT License
360 stars 115 forks source link

Fixed bug when loading page hovering a li #21

Closed doppiam closed 7 years ago

doppiam commented 7 years ago

I've made this change to fix this issue, basically if you load the page, and your mouse in hovering a first level li before the document is ready, that li will work backwards; so hover to hide, mouseleave to show

marioloncarek commented 7 years ago

thanks, merged

LouisUK commented 7 years ago

@marioloncarek This does not fix the problem. The drop down does not work correctly with this fix.

doppiam commented 7 years ago

@LouisUK @bdolleschal What do you mean guys? Can you provide an example? thanks!

LouisUK commented 7 years ago

@doppiam If you run your updated code on the megamenu codepen, the menu bugs out. Link: https://codepen.io/riogrande/pen/MKXweV

doppiam commented 7 years ago

@LouisUK the js in the code you linked is not the updated one

doppiam commented 7 years ago

I am using the updated code in 2 active projects with no errors; let's figure out what is not working :)

LouisUK commented 7 years ago

@doppiam hmm weird. I will look into it more, too. Here's the codepen updated with your pull update. https://codepen.io/anon/pen/WELLBe

I'm on Windows 7 using Chrome Version 60.0.3112.113

doppiam commented 7 years ago

@LouisUK So after looking back to the code I found the problem on my last PR: https://github.com/marioloncarek/megamenu-js/pull/24

hope this help!

doppiam commented 7 years ago

@LouisUK @marioloncarek WAIT! I see it now! there was some problems with the merge last time! the menu isn't working also from mobile!! I've look in my current project and found the other error! I'm recreating now the PR! sorry guys!

doppiam commented 7 years ago

@LouisUK @marioloncarek this is the fix: https://github.com/marioloncarek/megamenu-js/pull/25

LouisUK commented 7 years ago

@doppiam Good job! Works well, thanks :+1: