diff options
author | Felix Nagel <info@felixnagel.com> | 2012-01-11 21:20:24 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-01-11 21:20:24 +0100 |
commit | 762131396e8c993b1bef3d786bbd6cc34dfb4bce (patch) | |
tree | 9cdfc179f4f18e42f4277ca6071b5dd950a3931a /ui/jquery.ui.selectmenu.js | |
parent | 8c17f74a1e64e134108f790d2527df18284ac9cc (diff) | |
download | jquery-ui-762131396e8c993b1bef3d786bbd6cc34dfb4bce.tar.gz jquery-ui-762131396e8c993b1bef3d786bbd6cc34dfb4bce.zip |
Selectmenu: improved disabled state handling
Diffstat (limited to 'ui/jquery.ui.selectmenu.js')
-rw-r--r-- | ui/jquery.ui.selectmenu.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index b116caa1e..ef56dcd04 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -62,6 +62,10 @@ $.widget( "ui.selectmenu", { this._bind( this.button, this._buttonEvents ); this._drawMenu(); + + if ( this.element.attr( 'disabled' ) ) { + this.disable(); + } }, _drawButton: function() { @@ -78,7 +82,6 @@ $.widget( "ui.selectmenu", { css: { width: this.element.outerWidth() }, - 'aria-disabled': this.options.disabled, 'aria-owns': this.ids.menu, 'aria-haspopup': true }) @@ -391,6 +394,7 @@ $.widget( "ui.selectmenu", { } if ( key === "disabled" ) { this.button.button( "option", "disabled", value ); + this.menu.menu( "option", "disabled", value ); if ( value ) { this.element.attr( "disabled", "disabled" ); this.button.attr( "tabindex", -1 ); @@ -399,7 +403,6 @@ $.widget( "ui.selectmenu", { this.element.removeAttr( "disabled" ); this.button.attr( "tabindex", 0 ); } - this.menu.attr( "aria-disabled", value ); } }, |