From: Felix Nagel Date: Thu, 30 May 2013 19:25:15 +0000 (+0200) Subject: Selectmenu: use that.focusIndex != null instead of !== undefined when checking first... X-Git-Tag: 1.11.0-beta.1~160^2~56 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7be7d96ee205605279f8305d399c4b1e91b59c51;p=jquery-ui.git Selectmenu: use that.focusIndex != null instead of !== undefined when checking first focus event --- diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 7cc8b9191..d37f50b17 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -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 );