fix massinput click handling

This commit is contained in:
Gregor Kleen 2019-05-05 15:02:30 +02:00
parent 70d3ebcd2c
commit 7c2201da8b

View File

@ -82,9 +82,16 @@
}
return function(event) {
var activeElement;
// 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 (event.type === 'click') {
activeElement = event.target;
} else {
activeElement = element.querySelector(':focus, :active');
}
if (!activeElement) {
return false;
}