[openstreetmap/openstreetmap-website] Some buttons have become less responsive in Safari on Mac (#2811)

Dan Karran notifications at github.com
Sat Sep 5 19:55:23 UTC 2020


I've replicated part of the issue locally with a simple setup of Leaflet and jQuery. 

What seems to be happening is that Safari is emitting two click events for those buttons when clicking them normally, but only one event if force clicking on the trackpad. Chrome only emits one click event as expected, whether clicking normally or with force.

So the first click event in Safari is enabling the tool, and the second is disabling it straight away. That's presumably why the query button flashes green momentarily in iOS. The reason the note tool works is that pressing it a second time doesn't disable it, it just quietly loads it again.

I'll experiment with some alternatives, such as listening for 'pointerdown' instead of 'click' events (which may have unintended side effects) or listening for events using L.DomEvent instead of jQuery.

Maybe worth rolling back to the previous version of Leaflet in the meantime?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2811#issuecomment-687655538
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200905/0c2e5c30/attachment.htm>


More information about the rails-dev mailing list