]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu: Remove the ui-state-active class from the siblings of the newly activated menu... 392/head
authorkborchers <k_borchers@yahoo.com>
Wed, 13 Jul 2011 20:33:17 +0000 (15:33 -0500)
committerkborchers <k_borchers@yahoo.com>
Wed, 13 Jul 2011 20:33:17 +0000 (15:33 -0500)
ui/jquery.ui.menu.js

index 770e0252a6076d83bd5abc3ffeb4c650a3167114..5f9de6134f4e06c9dd2c01261e06db362725b02e 100644 (file)
@@ -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 );
                                }
                        })