From 49b038ed59f3c76f36601c69d38ee2e6530a7815 Mon Sep 17 00:00:00 2001 From: Daryl 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: https://develop.svn.wordpress.org/trunk@21065 602fd350-edb4-49c9-b593-d223f7449a82 --- 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