From d6d52dcddba23efab4a43be6b08acb5afd8198d1 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Sat, 7 Jul 2018 19:46:12 +0200 Subject: [PATCH] Do not rely on L.Browser.touch to disable click propagation --- umap/static/umap/js/umap.controls.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.controls.js b/umap/static/umap/js/umap.controls.js index de8ab0b0..b8b72f46 100644 --- a/umap/static/umap/js/umap.controls.js +++ b/umap/static/umap/js/umap.controls.js @@ -475,10 +475,12 @@ L.U.DataLayersControl = L.Control.extend({ this.update(); }, this); - if (!L.Browser.touch) { + if (L.Browser.pointer) { L.DomEvent.disableClickPropagation(container); L.DomEvent.on(container, 'mousewheel', L.DomEvent.stopPropagation); L.DomEvent.on(container, 'MozMousePixelScroll', L.DomEvent.stopPropagation); + } + if (!L.Browser.touch) { L.DomEvent.on(container, { mouseenter: this.expand, mouseleave: this.collapse