Skip to content

Commit

Permalink
refs #40578. Correctly detect clicked button in form submission for S…
Browse files Browse the repository at this point in the history
…afari browser
  • Loading branch information
poliphilochu committed Jun 19, 2024
1 parent c7cac71 commit 428a5c6
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,16 @@
}
}
});
var clickSubmitButton;
$('#MailingOption').on('click', '.form-submit', function(e) {
clickSubmitButton = $(e.target);
});

$("#MailingOption").submit(function(e){
var button;
if ($(this).data('action')) {
button = $(this).data('action');
}
else {
button = clickSubmitButton.attr('name');
button = $(e.originalEvent.submitter).attr('name');
}

if (button == '_qf_MailingOption_next' && !confirmEmail) {
$('#dialog-confirm-email').dialog('open');
}
Expand Down

0 comments on commit 428a5c6

Please sign in to comment.