aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.widget.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2013-09-16 11:58:05 -0400
committerScott González <scott.gonzalez@gmail.com>2013-09-16 11:58:05 -0400
commit134fcafddac25b8e81160718fec59c39e7c76c59 (patch)
treed76227f0a11d24b1e72f7dfb294c89e2251e553b /ui/jquery.ui.widget.js
parentbdfe7196a2b14d0970de30fe5cb6a45bc87e0b93 (diff)
parentd13df39e39010bb7cf2cec11b5206e85ea5fca2a (diff)
downloadjquery-ui-134fcafddac25b8e81160718fec59c39e7c76c59.tar.gz
jquery-ui-134fcafddac25b8e81160718fec59c39e7c76c59.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.widget.js')
-rw-r--r--ui/jquery.ui.widget.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index 885e2019f..a46dcaf99 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -203,7 +203,10 @@ $.widget.bridge = function( name, object ) {
this.each(function() {
var instance = $.data( this, fullName );
if ( instance ) {
- instance.option( options || {} )._init();
+ instance.option( options || {} );
+ if ( instance._init ) {
+ instance._init();
+ }
} else {
$.data( this, fullName, new object( options, this ) );
}
@@ -349,8 +352,12 @@ $.Widget.prototype = {
if ( key === "disabled" ) {
this.widget()
.toggleClass( this.widgetFullName + "-disabled", !!value );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
+
+ // If the widget is becoming disabled, then nothing is interactive
+ if ( value ) {
+ this.hoverable.removeClass( "ui-state-hover" );
+ this.focusable.removeClass( "ui-state-focus" );
+ }
}
return this;