From 3e4c82c5571f056be85fed1ae0fe3349ecfbb3d9 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 27 Jul 2020 10:32:49 +0200 Subject: [PATCH 1/2] Use transpiled modules for legacy build --- config/webpack-config-legacy-build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/webpack-config-legacy-build.js b/config/webpack-config-legacy-build.js index 6b4e60b5fa..d66977b9c9 100644 --- a/config/webpack-config-legacy-build.js +++ b/config/webpack-config-legacy-build.js @@ -5,7 +5,7 @@ module.exports = { mode: 'production', resolve: { alias: { - ol: path.resolve('./src/ol'), + ol: path.resolve('./build/ol'), }, }, output: { From fe16ce6b4dbcdcbd5ae09c7ffa9d17a4ff1b825e Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 27 Jul 2020 11:06:11 +0200 Subject: [PATCH 2/2] IE does not support document.contains --- src/ol/PluggableMap.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index b5818bd717..892451c983 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -1007,14 +1007,16 @@ class PluggableMap extends BaseObject { originalEvent.clientY ); if ( + // Abort if the target is a child of the container for elements whose events are not meant + // to be handled by map interactions. + this.overlayContainerStopEvent_.contains(target) || // Abort if the event target is a child of the container that 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 that recreates it's content based on // user interaction either manually or via a render in something like https://reactjs.org/ - !rootNode.contains(target) || - // Abort if the target is a child of the container for elements whose events are not meant - // to be handled by map interactions. - this.overlayContainerStopEvent_.contains(target) + !(rootNode === document ? document.documentElement : rootNode).contains( + target + ) ) { return; }