From edee0dcba2dca932e80ce737bee3e0cd83cfdae4 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Tue, 9 Aug 2011 22:01:47 +0200 Subject: [PATCH] fixed: problem when hiding first option by css, thx to @RobertSheaO, see #152 --- ui/jquery.ui.selectmenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index df7dd8f9a..5a446bb74 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -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(); -- 2.39.5