diff options
author | Felix Nagel <info@felixnagel.com> | 2013-09-25 21:18:57 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2013-09-25 21:18:57 +0200 |
commit | de4e863552b75aca84d0c5a380243142c6e9baf2 (patch) | |
tree | 9fe159d8fde8ca72e4e4777dc2e6f116b0a28096 /ui/jquery.ui.widget.js | |
parent | 4ddd14fe43fd0539b4d886db6a4c874c993e8739 (diff) | |
parent | 134fcafddac25b8e81160718fec59c39e7c76c59 (diff) | |
download | jquery-ui-de4e863552b75aca84d0c5a380243142c6e9baf2.tar.gz jquery-ui-de4e863552b75aca84d0c5a380243142c6e9baf2.zip |
Merge branch 'selectmenu' of github.com:jquery/jquery-ui into selectmenu
Diffstat (limited to 'ui/jquery.ui.widget.js')
-rw-r--r-- | ui/jquery.ui.widget.js | 13 |
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; |