aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.button.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2013-03-14 15:07:06 -0400
committerScott González <scott.gonzalez@gmail.com>2013-03-14 15:07:06 -0400
commit23771d38ba9d2663f6db0243c8e992dc7ff6844a (patch)
tree6345e5bf4901f23f2d0bf59b7a1d37743db37921 /ui/jquery.ui.button.js
parent38fce3f30478bcfce8ea837d850f63b5560d605a (diff)
downloadjquery-ui-23771d38ba9d2663f6db0243c8e992dc7ff6844a.tar.gz
jquery-ui-23771d38ba9d2663f6db0243c8e992dc7ff6844a.zip
Revert "Widget: Stop setting ui-state-disabled and aria by default on setting disabled option." This needs to wait for a major release.
This reverts commit 4d67f4f34908a50ef88f95df4103ee001b777e45.
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r--ui/jquery.ui.button.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 5e64f5164..fcb7b14d1 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -207,6 +207,9 @@ $.widget( "ui.button", {
}
}
+ // TODO: pull out $.Widget's handling for the disabled option into
+ // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
+ // be overridden by individual plugins
this._setOption( "disabled", options.disabled );
this._resetButton();
},
@@ -270,8 +273,11 @@ $.widget( "ui.button", {
_setOption: function( key, value ) {
this._super( key, value );
if ( key === "disabled" ) {
- this.widget().toggleClass( "ui-state-disabled", !!value );
- this.element.prop( "disabled", !!value );
+ if ( value ) {
+ this.element.prop( "disabled", true );
+ } else {
+ this.element.prop( "disabled", false );
+ }
return;
}
this._resetButton();