Make events work when inside a web component

This commit is contained in:
Andreas Hocevar
2020-05-09 21:57:14 +02:00
parent e74832b13b
commit 12b5a829d9
2 changed files with 25 additions and 6 deletions

View File

@@ -272,6 +272,19 @@ class MapBrowserEventHandler extends EventTarget {
this
)
);
if (
this.element_.getRootNode &&
this.element_.getRootNode() !== document
) {
this.dragListenerKeys_.push(
listen(
this.element_.getRootNode(),
MapBrowserEventType.POINTERUP,
this.handlePointerUp_,
this
)
);
}
}
}