aboutsummaryrefslogtreecommitdiffstats
path: root/ui/button.js
diff options
context:
space:
mode:
authorDaniel DeGroff <djdegroff@gmail.com>2013-12-11 22:53:48 -0600
committerScott González <scott.gonzalez@gmail.com>2014-04-21 09:14:54 -0400
commit23d7d50f374f71efec418276a343e947cb80aea6 (patch)
treec2543d6a605816dfb185503a598c019cb3581829 /ui/button.js
parent712ac17fc774d04c0369b7b452b2a08faf66ae19 (diff)
downloadjquery-ui-23d7d50f374f71efec418276a343e947cb80aea6.tar.gz
jquery-ui-23d7d50f374f71efec418276a343e947cb80aea6.zip
Button: Remove `ui-state-active` when disabling buttons
Fixes #9602 Closes gh-1151
Diffstat (limited to 'ui/button.js')
-rw-r--r--ui/button.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/button.js b/ui/button.js
index 247aba6e5..5d502ad51 100644
--- a/ui/button.js
+++ b/ui/button.js
@@ -260,7 +260,11 @@ $.widget( "ui.button", {
this.widget().toggleClass( "ui-state-disabled", !!value );
this.element.prop( "disabled", !!value );
if ( value ) {
- this.buttonElement.removeClass( "ui-state-focus" );
+ if ( this.type === "checkbox" || this.type === "radio" ) {
+ this.buttonElement.removeClass( "ui-state-focus" );
+ } else {
+ this.buttonElement.removeClass( "ui-state-focus ui-state-active" );
+ }
}
return;
}