diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-03-02 05:29:35 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-03-02 05:29:35 +0000 |
commit | 64811c10ec6e9d1bb79ec4aa06b8eb1a1344532c (patch) | |
tree | 1fc3c19263824c64943a9e834a17ba94b20ac5f8 | |
parent | 001a22a9d68eae09a056271804d980e65da636e1 (diff) | |
download | jquery-ui-64811c10ec6e9d1bb79ec4aa06b8eb1a1344532c.tar.gz jquery-ui-64811c10ec6e9d1bb79ec4aa06b8eb1a1344532c.zip |
Button: Add disabled class on init if the disabled option is set to true.
Fixes #5250 - Button: initializing with disabled = true isn't visually disabled.
-rw-r--r-- | ui/jquery.ui.button.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 62f7a02f5..9adf0c193 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -141,6 +141,10 @@ $.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 + $.Widget.prototype._setOption.call( this, "disabled", options.disabled ); this._resetButton(); }, |