Double click on the legend propagates to the map in Chrome
Google Chrome is now touch-enabled, so L.Browser.touch returns true, meaning line 91 is called instead of lines 93 & 94.
I'm guessing these lines are intended to correct the UX on mobile devices rather than Chrome?
The behaviour is strange... The basic example works fine also in chrome, the advanced example no..
The only difference in the code is the leaflet version
@kingrollo I do not understand if your proposal code change is the solution of the problem..??
@kingrollo Those lines were likely copied verbatim from the Leaflet version of the layers class. It's possible the leaflet implementation changed as well. I'd be happy to merge a PR related to that kind of bug.
@ismyrnow Is the latest equivalent code in L.Control.Layers at line 182 and line 183? Looks as though it might have changed significantly since the code was originally copied, but it doesn't look impossible to fix...
My current workaround looks like:
var layerControl = L.control.groupedLayers(baseMaps, overlays).addTo(this.map);
L.DomEvent.disableClickPropagation(layerControl._container);
L.DomEvent.disableScrollPropagation(layerControl._container);
This solved the issue so far.
Kinda late but I added:
// ... ~ line 240 in the .js
input.layerId = L.Util.stamp(obj.layer);
input.groupID = obj.group.id;
L.DomEvent.on(input, 'click', this._onInputClick, this);
// I added these lines to keep the control from acting wacky on Chrome
var stop = L.DomEvent.stopPropagation;
L.DomEvent.on(input, 'mousedown', stop)
.on(input, 'touchstart', stop)
.on(input, 'dblclick', stop)
.on(input, 'mousewheel', stop)
.on(input, 'MozMozMousePixelScroll', stop)