Skip to content
Snippets Groups Projects
Commit 6a79e88f authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

use event.currentTarget instead of event.target to ensure that the right...

Closes #2392

Merge request studip/studip!1578
parent e597318d
No related branches found
No related tags found
No related merge requests found
...@@ -681,7 +681,7 @@ Dialog.initialize = function() { ...@@ -681,7 +681,7 @@ Dialog.initialize = function() {
// Actual dialog handler // Actual dialog handler
function dialogHandler(event) { function dialogHandler(event) {
if (!event.isDefaultPrevented() && checkValidity(event.target)) { if (!event.isDefaultPrevented() && checkValidity(event.currentTarget)) {
let target = $(event.target).closest('[data-dialog]'); let target = $(event.target).closest('[data-dialog]');
let options = target.data().dialog; let options = target.data().dialog;
...@@ -700,7 +700,7 @@ Dialog.initialize = function() { ...@@ -700,7 +700,7 @@ Dialog.initialize = function() {
} }
function clickHandler(event) { function clickHandler(event) {
if (!event.isDefaultPrevented() && checkValidity(event.target)) { if (!event.isDefaultPrevented() && checkValidity(event.currentTarget)) {
var element = $(event.target).closest(':submit,input[type="image"]'); var element = $(event.target).closest(':submit,input[type="image"]');
var form = element.closest('form'); var form = element.closest('form');
var action = element.attr('formaction'); var action = element.attr('formaction');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment