@@ -71,11 +71,6 @@ return $.widget( "ui.menu", {
71
71
tabIndex : 0
72
72
} ) ;
73
73
74
- if ( this . options . disabled ) {
75
- this . _addClass ( null , "ui-state-disabled" ) ;
76
- this . element . attr ( "aria-disabled" , "true" ) ;
77
- }
78
-
79
74
this . _addClass ( "ui-menu" , "ui-widget ui-widget-content" ) ;
80
75
this . _on ( {
81
76
@@ -359,13 +354,16 @@ return $.widget( "ui.menu", {
359
354
this . _removeClass ( icons , null , this . options . icons . submenu )
360
355
. _addClass ( icons , null , value . submenu ) ;
361
356
}
362
- if ( key === "disabled" ) {
363
- this . element . attr ( "aria-disabled" , value ) ;
364
- this . _toggleClass ( null , "ui-state-disabled" , ! ! value ) ;
365
- }
366
357
this . _super ( key , value ) ;
367
358
} ,
368
359
360
+ _setOptionDisabled : function ( value ) {
361
+ this . _super ( value ) ;
362
+
363
+ this . element . attr ( "aria-disabled" , String ( value ) ) ;
364
+ this . _toggleClass ( null , "ui-state-disabled" , ! ! value ) ;
365
+ } ,
366
+
369
367
focus : function ( event , item ) {
370
368
var nested , focused , activeParent ;
371
369
this . blur ( event , event && event . type === "focus" ) ;
0 commit comments