]> source.dussan.org Git - jquery-ui.git/commitdiff
Selectmenu: add ui-state-active class to active list item
authorFelix Nagel <info@felixnagel.com>
Mon, 21 Oct 2013 18:39:15 +0000 (20:39 +0200)
committerFelix Nagel <info@felixnagel.com>
Mon, 21 Oct 2013 18:39:15 +0000 (20:39 +0200)
ui/jquery.ui.selectmenu.js

index 90dfce824487fbd9c4b0c3535a04bfae89e76e7b..3fdde767b6f7658941523927c11afe01976e6d45 100644 (file)
@@ -201,6 +201,7 @@ $.widget( "ui.selectmenu", {
                        // Shouldn't the underlying menu always have accurate state?
                        this.menu.find( ".ui-state-focus" ).removeClass( "ui-state-focus" );
                        this.menuInstance.focus( null, this._getSelectedItem() );
+                       this.menuItems.eq( this.element[ 0 ].selectedIndex ).addClass( "ui-state-active" ); 
                }
 
                this.isOpen = true;