Open lrustand opened 4 years ago
Do you have a version that can be looked at in codesandbox.io or equivalent? It would make it easier for others to analyse.
Thank you for your response. I believe the problem was I didn't include all the necessary script files. A little weird that it actually works in Chrome when it was missing script files, but this seems to be what was causing it as it is working correctly in all browsers now after including all the files.
I am having the same problem, which script files exactly were those missing?
@lrustand Not sure if that is really related but this solution anyway: https://github.com/Leaflet/Leaflet.draw/issues/955#issuecomment-601190466
From what I found this is a problem from version 1.7.0 onwards (1.6.0 works). In 1.7.0 there was some work on browser detection and passive event detection. Also #665 is for sure related to this.
Overall it seems that Leaflet.Draw thinks it is on mobile (checkout the enlarged vertex pullies compared to "working/desktop" version). But I have not figured a way to solve this.
How to reproduce
What behavior I'm expecting
The following two screenshots show what I expect to happen when I move a vertex: I click and hold mouse button on the vertex and drag it somewhere.
The vertex is moved to the new location, no other vertices are added or changed in any way. This is what happens in Google Chrome on all of my machines.
Which behavior I'm seeing
And this is what happens when I try the same in Firefox: I try to move the marked vertex.
Pull it out to the right. The vertex is moved correctly, but there still is a vertex in the original position.
Move that vertex too. This one moves correctly, but reveals yet another vertex in the original position as seen in the last screenshot.
Other details
The problem happens every time on Firefox. I have tried several different machines, with several different versions of Firefox on different Oses. Even tried it on Firefox Mobile.
I have also tried using Chrome on several different machines, and that works flawlessly every time.