From 4811176a7c59965ac3a4d6d35e526c1f6282bc9c Mon Sep 17 00:00:00 2001 From: koopersmith Date: Tue, 12 Jun 2012 16:36:32 +0000 Subject: [PATCH] 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 --- wp-admin/js/common.dev.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-admin/js/common.dev.js b/wp-admin/js/common.dev.js index 6c260b3381..4c87a877fa 100644 --- a/wp-admin/js/common.dev.js +++ b/wp-admin/js/common.dev.js @@ -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