Open
Description
This code
Lines 3 to 7 in 2880228
Fails when node is not inside the current window. The main use case is using one screen for presentation and another screen for information that the presenter see.
an idea of a fix:
const nodeWindow = node?.ownerDocument?.defaultView;
return node instanceof nodeWindow.HTMLElement || node instanceof nodeWindow.SVGElement;
The issue is that the above code doesn't really work because you need to know if node is an Element first before getting the window, so we'll need a better idea for a fix.
a fix that I feel like is a hack:
return "nodeType" in node && node === Node.ELEMENT_NODE && "tagName" in node;
I don't know if this is good enough, but it works, fixes the bug.
same thing also happens here
Line 6 in 2880228
Metadata
Metadata
Assignees
Labels
No labels