File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ $.widget("ui.dialog", {
144144 }
145145
146146 this . createButtons ( options . buttons ) ;
147+ this . isOpen = false ;
147148
148149 ( options . bgiframe && $ . fn . bgiframe && uiDialog . bgiframe ( ) ) ;
149150 ( options . autoOpen && this . open ( ) ) ;
@@ -241,6 +242,8 @@ $.widget("ui.dialog", {
241242 } ,
242243
243244 open : function ( ) {
245+ if ( this . isOpen ) { return ; }
246+
244247 this . overlay = this . options . modal ? new $ . ui . dialog . overlay ( this ) : null ;
245248 this . uiDialog . appendTo ( 'body' ) ;
246249 this . position ( this . options . position ) ;
@@ -255,6 +258,8 @@ $.widget("ui.dialog", {
255258 } ;
256259 this . uiDialogTitlebarClose . focus ( ) ;
257260 this . element . triggerHandler ( "dialogopen" , [ openEV , openUI ] , this . options . open ) ;
261+
262+ this . isOpen = true ;
258263 } ,
259264
260265 // the force parameter allows us to move modal dialogs to their correct
@@ -282,6 +287,8 @@ $.widget("ui.dialog", {
282287 } ;
283288 this . element . triggerHandler ( "dialogclose" , [ closeEV , closeUI ] , this . options . close ) ;
284289 $ . ui . dialog . overlay . resize ( ) ;
290+
291+ this . isOpen = false ;
285292 } ,
286293
287294 destroy : function ( ) {
You can’t perform that action at this time.
0 commit comments