]> source.dussan.org Git - jquery-ui.git/commitdiff
Selectmenu: use that.focusIndex != null instead of !== undefined when checking first...
authorFelix Nagel <info@felixnagel.com>
Thu, 30 May 2013 19:25:15 +0000 (21:25 +0200)
committerFelix Nagel <info@felixnagel.com>
Thu, 30 May 2013 19:25:15 +0000 (21:25 +0200)
ui/jquery.ui.selectmenu.js

index 7cc8b9191cef1256957d37a51d6ba9baf8bf980c..d37f50b17dc35ab67a51691399e3de4be5b45c75 100644 (file)
@@ -133,7 +133,7 @@ $.widget( "ui.selectmenu", {
                                var item = ui.item.data( "ui-selectmenu-item" );
 
                                // prevent inital focus from firing and checks if its a newly focused item
-                               if ( that.focusIndex !== undefined && item.index !== that.focusIndex ) {
+                               if ( that.focusIndex != null && item.index !== that.focusIndex ) {
                                        that._trigger( "focus", event, { item: item } );
                                        if ( !that.isOpen ) {
                                                that._select( item, event );