Permalink
Browse files

Widget: Only remove hover and focus classes when disabling, not enabl…

…ing. Fixes #9558 - Widget: .enable() while already enabled kills ui-state-focus and ui-state-hover.
  • Loading branch information...
scottgonzalez committed Sep 16, 2013
1 parent 1552fc8 commit d13df39e39010bb7cf2cec11b5206e85ea5fca2a
Showing with 6 additions and 2 deletions.
  1. +6 −2 ui/jquery.ui.widget.js
View
@@ -352,8 +352,12 @@ $.Widget.prototype = {
if ( key === "disabled" ) {
this.widget()
.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;

0 comments on commit d13df39

Please sign in to comment.