Make events work in shadow dom
This commit is contained in:
@@ -934,7 +934,7 @@ class PluggableMap extends BaseObject {
|
|||||||
}
|
}
|
||||||
const target = /** @type {Node} */ (mapBrowserEvent.originalEvent.target);
|
const target = /** @type {Node} */ (mapBrowserEvent.originalEvent.target);
|
||||||
if (!mapBrowserEvent.dragging) {
|
if (!mapBrowserEvent.dragging) {
|
||||||
if (this.overlayContainerStopEvent_.contains(target) || !document.body.contains(target)) {
|
if (this.overlayContainerStopEvent_.contains(target) || !(document.body.contains(target) || this.viewport_.getRootNode && this.viewport_.getRootNode().contains(target))) {
|
||||||
// Abort if the event target is a child of the container that doesn't allow
|
// Abort if the event target is a child of the container that doesn't allow
|
||||||
// event propagation or is no longer in the page. It's possible for the target to no longer
|
// event propagation or is no longer in the page. It's possible for the target to no longer
|
||||||
// be in the page if it has been removed in an event listener, this might happen in a Control
|
// be in the page if it has been removed in an event listener, this might happen in a Control
|
||||||
|
|||||||
Reference in New Issue
Block a user