openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.16k stars 908 forks source link

Update URL at the end of the gesture, not during #3173

Closed jidanni closed 3 years ago

jidanni commented 3 years ago

The Chrome team confirms, the OSM website should update the URL at the end of the gesture, not during!

Firefishy commented 3 years ago

This issue likely lives with LeafletJS and not here.

tomhughes commented 3 years ago

Well maybe - certainly we have absolutely no code of our own that has anything to do with gestures.

It would probably help if @jidanni clarified what gesture he is referring to.

HolgerJeromin commented 3 years ago

From the linked issue tracker:

The page is updating the url, which triggers updating history. On the desktop, the url only changes when the mouse is released. Seems like the right solution is for the page to update at the end of the gesture, not during.

Seems like we should move code from touchmove to touchend. No idea if this url history manipulating is done here or a leaflet plugin.

tomhughes commented 3 years ago

The only references to touchmove are actually in iD.

That said, as I say, we really need to know what gesture he is talking about!

jidanni commented 3 years ago

ID does not have the problem. (https://github.com/openstreetmap/iD/issues/9616) Openstreetmap website has the problem. All you need to do is move the map around and you'll see how many history entries it generates. It's like a DDOS job on the browser 's history list.

tomhughes commented 3 years ago

So that has absolutely nothing to do with gestures then, which would explain the confusion, or at least not directly.

Rather it is triggered by leaflet's moveend events - there are a variety of ways those can happen some of which may be gesture related but there's no immediate reason to believe that it generates more than it should.

Do you actually get multiple history entries for a continuous move, or just one after each move?

tomhughes commented 3 years ago

In case this is a duplicate of #506.