aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.button.js
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2010-03-15 14:13:17 +0000
committerRichard Worth <rdworth@gmail.com>2010-03-15 14:13:17 +0000
commit1489d7380d02828e6f496fba24679995c4fdae44 (patch)
treee468a359da93c3c5f7509ef367509314ef03afb6 /ui/jquery.ui.button.js
parente3096c7abb24a9a3fa748a1c10bb2cd31e74cf94 (diff)
downloadjquery-ui-1489d7380d02828e6f496fba24679995c4fdae44.tar.gz
jquery-ui-1489d7380d02828e6f496fba24679995c4fdae44.zip
Button: fixed #5324 - button disabled state doesn't get refreshed when disabled set on original element
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r--ui/jquery.ui.button.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 854fdc8e3..2f26e3158 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -240,6 +240,10 @@ $.widget( "ui.button", {
},
refresh: function() {
+ var isDisabled = this.element.is(":disabled");
+ if ( isDisabled !== this.options.disabled ) {
+ this._setOption( "disabled", isDisabled );
+ }
if ( this.type === "radio" ) {
radioGroup( this.element[0] ).each(function() {
if ( $( this ).is( ":checked" ) ) {