mdbootstrap / bootstrap-hover-dropdown

An unofficial Bootstrap plugin to enable Bootstrap dropdowns to activate on hover and provide a nice user experience.
http://cameronspear.com/demos/bootstrap-hover-dropdown/
MIT License
1.26k stars 503 forks source link

Make the code robust against duplicated timeouts #167

Open PetrDlouhy opened 2 years ago

PetrDlouhy commented 2 years ago

There is number of cases (i.e. two buttons triggering same dropdown) when the code would set up multiple timeouts at the same time. This can easily lead to weird and unexpected behavior such as dropdown hiding at unexpected moments when the mouse is still hovering over the active elements.

If we keep all the timeouts in array and clear all of them all of them, it would make the code robust against such problems. I expect that even the stop this event if conditions might not be needed anymore.