]> source.dussan.org Git - jquery-ui.git/commitdiff
fixed: disabled optgroup options receive focus, thx to gcko, see https://github.com...
authorFelix Nagel <info@felixnagel.com>
Tue, 28 Jun 2011 22:31:06 +0000 (00:31 +0200)
committerFelix Nagel <info@felixnagel.com>
Tue, 28 Jun 2011 22:31:06 +0000 (00:31 +0200)
ui/jquery.ui.selectmenu.js

index c0e21dd3413d18d3870b7127b980f526973cfd20..0d4f45a80cae189b003f93d76138782b43986c66 100644 (file)
@@ -289,7 +289,7 @@ $.widget("ui.selectmenu", {
                                })
                                .bind('mouseover.selectmenu focus.selectmenu', function(e) {
                                        // no hover if diabled
-                                       if (!$(e.currentTarget).hasClass(self.namespace + '-state-disabled')) {
+                                       if (!$(e.currentTarget).hasClass(self.namespace + '-state-disabled') && !$(e.currentTarget).parent("ul").parent("li").hasClass(self.namespace + '-state-disabled')) {
                                                self._selectedOptionLi().addClass(activeClass);
                                                self._focusedOptionLi().removeClass(self.widgetBaseClass + '-item-focus ui-state-hover');
                                                $(this).removeClass('ui-state-active').addClass(self.widgetBaseClass + '-item-focus ui-state-hover');