File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -219,9 +219,14 @@ const VE = {
219219 } ,
220220 } ,
221221 create : function ( ) {
222- const buttonGroup = $ ( this ) . closest ( '.ui-dialog' ) . find ( '.ui-dialog-buttonset' ) ;
223- buttonGroup . find ( 'button:first' ) . addClass ( 'button submit' ) ;
224- buttonGroup . find ( 'button:last' ) . addClass ( 'button button-secondary cancel' ) ;
222+ const buttons = $ ( this ) . dialog ( 'widget' ) . find ( '.ui-dialog-buttonpane button' ) ;
223+ buttons . first ( ) . addClass ( 'button submit' ) ;
224+ buttons . last ( ) . addClass ( 'button button-secondary cancel' ) ;
225+ } ,
226+ focus : function ( ) {
227+ const buttons = $ ( this ) . dialog ( 'widget' ) . find ( '.ui-dialog-buttonpane button' ) ;
228+ // Disable default "focus first button" behavior
229+ buttons . first ( ) . blur ( ) ;
225230 } ,
226231 } ;
227232
You can’t perform that action at this time.
0 commit comments