diff options
author | kborchers <k_borchers@yahoo.com> | 2011-07-13 15:33:17 -0500 |
---|---|---|
committer | kborchers <k_borchers@yahoo.com> | 2011-07-13 15:33:17 -0500 |
commit | bc93b3ff080160e4e8e7a035e2e4421d1521e224 (patch) | |
tree | 3a6ac4268071ee734fa99bc8f2cccf068102e782 /ui/jquery.ui.menu.js | |
parent | 7856b264a297d78762f599611580804b92afd1c0 (diff) | |
download | jquery-ui-bc93b3ff080160e4e8e7a035e2e4421d1521e224.tar.gz jquery-ui-bc93b3ff080160e4e8e7a035e2e4421d1521e224.zip |
Menu: Remove the ui-state-active class from the siblings of the newly activated menu item without a delay to fix a bug where mouseover of a menu item directly adjacent to the active item would cause a 1 pixel jump due to both items having a class with a border (ui-state-active and ui-state-focus)
Diffstat (limited to 'ui/jquery.ui.menu.js')
-rw-r--r-- | ui/jquery.ui.menu.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 770e0252a..5f9de6134 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -58,6 +58,8 @@ $.widget( "ui.menu", { } var target = $( event.target ).closest( ".ui-menu-item" ); if ( target.length ) { + //Remove ui-state-active class from siblings of the newly focused menu item to avoid a jump caused by adjacent elements both having a class with a border + target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" ); self.focus( event, target ); } }) |