dont async handle massinput if from outside massinput element

This commit is contained in:
Felix Hamann 2019-04-23 14:19:52 +02:00 committed by Gregor Kleen
parent 11c5cd3653
commit 965e3947f9

View File

@ -65,6 +65,13 @@
}
return function(event) {
// check if event occured from either a mass input add/delete button or
// from inside one of massinput's inputs (i.e. they are focused/active)
var activeElement = element.querySelector(':focus, :active');
if (!activeElement) {
return false;
}
event.preventDefault();
var formData = new FormData(massInputForm);
@ -83,7 +90,6 @@
{
'Content-Type': enctype,
'Mass-Input-Shortcircuit': massInputId,
'Upgrade-Insecure-Requests': 1,
},
requestBody,
).then(function(response) {