Do not rely on L.Browser.touch to disable click propagation

This commit is contained in:
Yohan Boniface 2018-07-07 19:46:12 +02:00
parent f11fe36865
commit d6d52dcddb

View file

@ -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