@@ -71,11 +71,6 @@ return $.widget( "ui.menu", {
7171 tabIndex : 0
7272 } ) ;
7373
74- if ( this . options . disabled ) {
75- this . _addClass ( null , "ui-state-disabled" ) ;
76- this . element . attr ( "aria-disabled" , "true" ) ;
77- }
78-
7974 this . _addClass ( "ui-menu" , "ui-widget ui-widget-content" ) ;
8075 this . _on ( {
8176
@@ -359,13 +354,16 @@ return $.widget( "ui.menu", {
359354 this . _removeClass ( icons , null , this . options . icons . submenu )
360355 . _addClass ( icons , null , value . submenu ) ;
361356 }
362- if ( key === "disabled" ) {
363- this . element . attr ( "aria-disabled" , value ) ;
364- this . _toggleClass ( null , "ui-state-disabled" , ! ! value ) ;
365- }
366357 this . _super ( key , value ) ;
367358 } ,
368359
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+
369367 focus : function ( event , item ) {
370368 var nested , focused , activeParent ;
371369 this . blur ( event , event && event . type === "focus" ) ;
0 commit comments