Merge pull request #10255 from fredj/handleMapBrowserEvent_element_type

Don't use instanceof HTMLElement in handleMapBrowserEvent
This commit is contained in:
Frédéric Junod
2019-11-05 13:55:22 +01:00
committed by GitHub

View File

@@ -949,8 +949,8 @@ class PluggableMap extends BaseObject {
// coordinates so interactions cannot be used.
return;
}
let target = mapBrowserEvent.originalEvent.target;
while (target instanceof HTMLElement) {
let target = /** @type {Node} */ (mapBrowserEvent.originalEvent.target);
while (target) {
if (target.parentElement === this.overlayContainerStopEvent_) {
return;
}