File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ $.widget("ui.dialog", {
191191 }
192192
193193 // TODO merge with _createButtonPane?
194- this . _createButtons ( options . buttons ) ;
194+ this . _createButtons ( ) ;
195195
196196 this . _isOpen = false ;
197197
@@ -362,8 +362,9 @@ $.widget("ui.dialog", {
362362 this . _delay ( checkFocus ) ;
363363 } ,
364364
365- _createButtons : function ( buttons ) {
366- var that = this ;
365+ _createButtons : function ( ) {
366+ var that = this ,
367+ buttons = this . options . buttons ;
367368
368369 // if we already have a button pane, remove it
369370 this . uiDialogButtonPane . remove ( ) ;
@@ -573,10 +574,11 @@ $.widget("ui.dialog", {
573574
574575 this . _super ( key , value ) ;
575576
577+ if ( key === "buttons" ) {
578+ this . _createButtons ( ) ;
579+ }
580+
576581 switch ( key ) {
577- case "buttons" :
578- this . _createButtons ( value ) ;
579- break ;
580582 case "closeText" :
581583 // ensure that we always pass a string
582584 this . uiDialogTitlebarClose . button ( {
You can’t perform that action at this time.
0 commit comments