Leaflet / Leaflet.draw

Vector drawing and editing plugin for Leaflet
https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html
MIT License
1.96k stars 992 forks source link

Polyline dblclick issue in Firefox #991

Closed miko866 closed 4 years ago

miko866 commented 4 years ago

How to reproduce

What behaviour I'm expecting and which behaviour I'm seeing

For creating a polyline by double-clicking on the last point, a leaflet-decorator(custom arrowhead) should be added to this polyline. But in Firefox, double-clicking on the last point just completes the polyline and my double-click function is ignored. No arrow will be added to the end of the polyline. Everything works as it should in other browsers but not in Firefox.

Minimal example reproducing the issue

https://codesandbox.io/s/nice-sammet-q0zr3

bation commented 4 years ago

I face the problem as well ,but my brower is chrome,firefox is good in drawing polyline. I fixed the problem by downgrade leaflet to 1.3.1

miko866 commented 4 years ago

@bation thanks for your advice but I can't do downgrade from leaflet 1.6.0 to leaflet 1.3.1, that is no solution for me.

johnd0e commented 4 years ago

@miko866 Try this solution: https://github.com/Leaflet/Leaflet.draw/issues/955#issuecomment-601190466

miko866 commented 4 years ago

@johnd0e Try this solution: #955 (comment)

Super thank you its works.