parent
9557d8048b
commit
ff1f256ffa
@ -97,7 +97,9 @@ function docImposterCreate(element, isTextarea) {
|
|||||||
|
|
||||||
function docElementsFromPoint(x, y, all) {
|
function docElementsFromPoint(x, y, all) {
|
||||||
if (all) {
|
if (all) {
|
||||||
return document.elementsFromPoint(x, y);
|
// document.elementsFromPoint can return duplicates which must be removed.
|
||||||
|
const elements = document.elementsFromPoint(x, y);
|
||||||
|
return elements.filter((e, i) => elements.indexOf(e) === i);
|
||||||
}
|
}
|
||||||
|
|
||||||
const e = document.elementFromPoint(x, y);
|
const e = document.elementFromPoint(x, y);
|
||||||
|
Loading…
Reference in New Issue
Block a user