]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Override disabled option on create, force always-enabled state
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 21 Sep 2015 10:39:09 +0000 (12:39 +0200)
committerScott González <scott.gonzalez@gmail.com>
Fri, 25 Sep 2015 17:46:53 +0000 (13:46 -0400)
Without this, _on will still respect the disabled option and ends up
preventing closing the dialog.

Ref #9151
Ref gh-1599

ui/widgets/dialog.js

index 4380c6f8fa2991a15fb2cc917f2d31abab3e3045..6070014c9d5f4fde66e47d5e9afa8455f4362f70 100644 (file)
@@ -129,6 +129,11 @@ $.widget( "ui.dialog", {
                        this.options.title = this.originalTitle;
                }
 
+               // Dialogs can't be disabled
+               if ( this.options.disabled ) {
+                       this.options.disabled = false;
+               }
+
                this._createWrapper();
 
                this.element