Prevent hoverIntent from shifting open, expanded admin menus if the entire submenu is not visible. props SergeyBiryukov, fixes #20857.

git-svn-id: http://core.svn.wordpress.org/trunk@21065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith 2012-06-12 16:36:32 +00:00
parent 21436ed8b9
commit 4811176a7c
1 changed files with 3 additions and 0 deletions

View File

@ -189,6 +189,9 @@ $(document).ready( function() {
over: function(e){
var b, h, o, f, m = $(this).find('.wp-submenu'), menutop, wintop, maxtop;
if ( m.is(':visible') )
return;
menutop = $(this).offset().top;
wintop = $(window).scrollTop();
maxtop = menutop - wintop - 30; // max = make the top of the sub almost touch admin bar