Set focus to the correct default button if there are nested dialogs.

master
Pacman Ghost 5 months ago
parent c5e1e53df4
commit e5ad66658a
  1. 2
      vasl_templates/webapp/static/utils.js

@ -234,7 +234,7 @@ function on_dialog_open( $dlg, $focus )
// set initial focus
if ( ! $focus )
$focus = $( ".ui-dialog-buttonpane button:contains(Cancel)" ) ;
$focus = findTopmostDialog().find( ".ui-dialog-buttonpane button:contains(Cancel)" ) ;
setTimeout( function() {
$focus.focus() ;
}, 20 ) ;

Loading…
Cancel
Save