Skip to content
Snippets Groups Projects
Commit fffb4027 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by 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 00a3e86f
No related branches found
No related tags found
No related merge requests found
......@@ -681,7 +681,7 @@ Dialog.initialize = function() {
// Actual dialog handler
function dialogHandler(event) {
if (!event.isDefaultPrevented() && checkValidity(event.target)) {
if (!event.isDefaultPrevented() && checkValidity(event.currentTarget)) {
let target = $(event.target).closest('[data-dialog]');
let options = target.data().dialog;
......@@ -700,7 +700,7 @@ Dialog.initialize = function() {
}
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 form = element.closest('form');
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