Here's a patch which adds timed menu hiding when mousing outside of a menu. This keeps menus from "popping" away when you sloppily mouse past the edge.
This is very lightweight, less flexible script than Superfish. And like Sucker/Superfish, it should degrade gracefully in non-IE browsers without JS support.
A very cool side effect of this script is that it negates the need for the IE-only javascript. The admin_menu.js file runs for all browsers now and the IE-stuff happens conditionally within it. No need for <!-- if lt IE 7 --> in the document head anymore.
Tested on Firefox, Safari, and IE 6 and it's working great in all of 'em.
Enjoy!
Comments
Comment #1
sunThanks, this looks very promising!
Re-rolled patch against current 5.x-2.x, not yet tested.
However, the .sfhover/.iehover classes were only needed for IE 6 previously. IE 7 seems to support the universal :hover style finally.
Comment #2
sunBased on the jQuery docs, we should be able to use parseInt($.browser.version) to specifically detect IE 6.
Added in attached patch.
Comment #3
sunHoly shit! Jeff, you rock!
Tested in Firefox 2, IE 6, Opera 9 and Safari 3 and committed!
Thank you!
Comment #4
smk-ka commentedMouseout delay rocks! However, am I the only one who finds it too slow? I'd prefer having around 400 msec delay, just enough time to move the mouse pointer back on the menu and not having the menu in my way when I want it to disappear.
Comment #5
yched commentedagreed :-) current value is a bit slow IMO
Comment #6
sunPlease test attached patch.
Comment #7
yched commentedsoo much better !
Comment #8
sunThanks, committed!
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.