mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Widget: Only remove hover and focus classes when disabling, not enabling. Fixes #9558 - Widget: .enable() while already enabled kills ui-state-focus and ui-state-hover.
This commit is contained in:
parent
1552fc8a05
commit
d13df39e39
8
ui/jquery.ui.widget.js
vendored
8
ui/jquery.ui.widget.js
vendored
@ -352,8 +352,12 @@ $.Widget.prototype = {
|
|||||||
if ( key === "disabled" ) {
|
if ( key === "disabled" ) {
|
||||||
this.widget()
|
this.widget()
|
||||||
.toggleClass( this.widgetFullName + "-disabled", !!value );
|
.toggleClass( this.widgetFullName + "-disabled", !!value );
|
||||||
this.hoverable.removeClass( "ui-state-hover" );
|
|
||||||
this.focusable.removeClass( "ui-state-focus" );
|
// If the widget is becoming disabled, then nothing is interactive
|
||||||
|
if ( value ) {
|
||||||
|
this.hoverable.removeClass( "ui-state-hover" );
|
||||||
|
this.focusable.removeClass( "ui-state-focus" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
Loading…
Reference in New Issue
Block a user