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 d6881e0 commit e5f0abf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/js/icinga/events.js
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 e5f0abf

Please sign in to comment.