diff options
author | Scott González <scott.gonzalez@gmail.com> | 2013-09-16 11:57:35 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2013-09-16 11:57:35 -0400 |
commit | d13df39e39010bb7cf2cec11b5206e85ea5fca2a (patch) | |
tree | d5fc13f303321bb5fea3be8057841bc9cb15c7ba /ui | |
parent | 1552fc8a05ad351650b2a56c5c31905c671f1cdf (diff) | |
download | jquery-ui-d13df39e39010bb7cf2cec11b5206e85ea5fca2a.tar.gz jquery-ui-d13df39e39010bb7cf2cec11b5206e85ea5fca2a.zip |
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.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.widget.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index b4aab5f3e..a46dcaf99 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -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; |