Merge pull request #3015 from Leaflet/2930
stopPropagation of click event following drag operation (fixes #2930)
This commit is contained in:
commit
8cc14fbd6f
@ -581,7 +581,10 @@ L.Map = L.Evented.extend({
|
||||
if (type === 'click') {
|
||||
var draggableObj = obj.options.draggable === true ? obj : this;
|
||||
if (!e._simulated && ((draggableObj.dragging && draggableObj.dragging.moved()) ||
|
||||
(this.boxZoom && this.boxZoom.moved()))) { return; }
|
||||
(this.boxZoom && this.boxZoom.moved()))) {
|
||||
L.DomEvent.stopPropagation(e);
|
||||
return;
|
||||
}
|
||||
obj.fire('preclick');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user