]> source.dussan.org Git - jquery-ui.git/commitdiff
fixed: problem when hiding first option by css, thx to @RobertSheaO, see #152
authorFelix Nagel <info@felixnagel.com>
Tue, 9 Aug 2011 20:01:47 +0000 (22:01 +0200)
committerFelix Nagel <info@felixnagel.com>
Tue, 9 Aug 2011 20:01:47 +0000 (22:01 +0200)
ui/jquery.ui.selectmenu.js

index df7dd8f9aa3a7ec5069b266b9333fe3d8171939a..5a446bb748aa6f480144f58d7c6a6b15801aa365 100644 (file)
@@ -550,7 +550,7 @@ $.widget("ui.selectmenu", {
                        if ( $.browser.msie && $.browser.version.substr( 0,1 ) == 7 ) {
                                self._refreshPosition();
                        }
-                       var selected = self.list.attr('aria-hidden', false).find('li:not(.' + self.widgetBaseClass + '-group):eq(' + self._selectedIndex() + ') a');
+                       var selected = self.list.attr('aria-hidden', false).find('li:not(.' + self.widgetBaseClass + '-group):eq(' + self._selectedIndex() + '):visible a');
                        if (selected.length) selected[0].focus();
                        // positioning needed for FF, Chrome, IE8, IE7, IE6 (tested 01.08.11 on MS VPC Image)
                        self._refreshPosition();