dont async handle massinput if from outside massinput element
This commit is contained in:
parent
11c5cd3653
commit
965e3947f9
@ -65,6 +65,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return function(event) {
|
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();
|
event.preventDefault();
|
||||||
var formData = new FormData(massInputForm);
|
var formData = new FormData(massInputForm);
|
||||||
|
|
||||||
@ -83,7 +90,6 @@
|
|||||||
{
|
{
|
||||||
'Content-Type': enctype,
|
'Content-Type': enctype,
|
||||||
'Mass-Input-Shortcircuit': massInputId,
|
'Mass-Input-Shortcircuit': massInputId,
|
||||||
'Upgrade-Insecure-Requests': 1,
|
|
||||||
},
|
},
|
||||||
requestBody,
|
requestBody,
|
||||||
).then(function(response) {
|
).then(function(response) {
|
||||||
|
|||||||
Reference in New Issue
Block a user