Only use elementFromPoint with ShadowRoot
This commit is contained in:
@@ -1000,12 +1000,12 @@ class PluggableMap extends BaseObject {
|
|||||||
? this.viewport_.getRootNode()
|
? this.viewport_.getRootNode()
|
||||||
: document;
|
: document;
|
||||||
const target =
|
const target =
|
||||||
rootNode === document
|
'host' in rootNode // ShadowRoot
|
||||||
? /** @type {Node} */ (originalEvent.target)
|
? /** @type {ShadowRoot} */ (rootNode).elementFromPoint(
|
||||||
: /** @type {ShadowRoot} */ (rootNode).elementFromPoint(
|
|
||||||
originalEvent.clientX,
|
originalEvent.clientX,
|
||||||
originalEvent.clientY
|
originalEvent.clientY
|
||||||
);
|
)
|
||||||
|
: /** @type {Node} */ (originalEvent.target);
|
||||||
if (
|
if (
|
||||||
// Abort if the target is a child of the container for elements whose events are not meant
|
// Abort if the target is a child of the container for elements whose events are not meant
|
||||||
// to be handled by map interactions.
|
// to be handled by map interactions.
|
||||||
|
|||||||
Reference in New Issue
Block a user