Skip to content

Commit

Permalink
Form submission: Identify pressed submit button associated through fo…
Browse files Browse the repository at this point in the history
…rm attribute
  • Loading branch information
raviks789 committed Feb 20, 2024
1 parent 58b3321 commit 22774ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/js/icinga/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@
if (typeof $button === 'undefined') {
var $el;

if (typeof event.originalEvent !== 'undefined'
if (event.originalEvent && event.originalEvent.submitter) {
$el = $(event.originalEvent.submitter);
} else if (typeof event.originalEvent !== 'undefined'
&& typeof event.originalEvent.explicitOriginalTarget === 'object') { // Firefox
$el = $(event.originalEvent.explicitOriginalTarget);
_this.icinga.logger.debug('events/submitForm: Button is event.originalEvent.explicitOriginalTarget');
Expand Down

0 comments on commit 22774ef

Please sign in to comment.