From 0852ceae9df2852295d212b06d020e45189a777d Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Wed, 29 Jun 2011 00:31:06 +0200 Subject: [PATCH] fixed: disabled optgroup options receive focus, thx to gcko, see https://github.com/fnagel/jquery-ui/issues/105#issuecomment-1386359 --- 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 c0e21dd34..0d4f45a80 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -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'); -- 2.39.5