From e5f0abf619c1070316ef596c355539978db36176 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Tue, 20 Feb 2024 15:57:01 +0100 Subject: [PATCH] Form submission: Identify pressed submit button associated through form attribute --- public/js/icinga/events.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/js/icinga/events.js b/public/js/icinga/events.js index 1878d8f604..3616acb581 100644 --- a/public/js/icinga/events.js +++ b/public/js/icinga/events.js @@ -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');