Canvas circleMarker fires 'click' after being draggedΒ #4458
Description
https://playground-leaflet.rhcloud.com/yaq/edit
Scenario:
Map initialized with preferCanvas: true
.
Added a circleMarker
var markerC = L.circleMarker(myCenter2,{radius:30}).bindPopup("popUp");
map.addLayer(markerC);
Bug: if you start the drag of the map while having the cursor ontop of the circlemarker and you stop the drag with the cursor still on the circleMarker the click event will fire ( i'm just assuming it's a click event) and the popup will open.
This is not the default behaviour, if you set preferCanvas: false
this will not happen.
I've found an intresting piece of code https://github.com/Leaflet/Leaflet/blob/master/src/map/Map.js#L969 but i don't know how to fix this for canvas markers.
EDit: the bug occurs also if you don't actually start the drag with the cursor ontop of the marker, it has just to be ontop of the marker when you end the drag
Activity