backdrop-contrib / leaflet

Backdrop CMS Integration with the Leaflet map scripting library.
https://backdropcms.org/project/leaflet
GNU General Public License v2.0
2 stars 2 forks source link

Safari on macOS popup problem since library update to 1.7.1 #17

Closed indigoxela closed 2 years ago

indigoxela commented 3 years ago

This has been reported in the Zulip chat:

I no longer get the popup tooltips when clicking on an icon. Looks like it is specific to Safari on MacOS (Big Sur).

This Leaflet issue (and all those "closed duplicate") seem related: https://github.com/Leaflet/Leaflet/issues/7255

indigoxela commented 3 years ago

There seems to be a workaround: https://github.com/domoritz/leaflet-locatecontrol/issues/280#issuecomment-773970457

But I can't test it. Any volunteers?

indigoxela commented 3 years ago

If you're using markercluster, put this into your modules/leaflet_markercluster/js/leaflet_markercluster.backdrop.js

        settings.tap = false;
        // instantiate our new map

in line 29 (the comment is only there for better orientation). Does this help?

tkcent commented 3 years ago

Yup, that works!

Weirdly enough, I can actually get the tooltip to work ONE time without the fix. If I right click on the page, click Inspect Element, and then choose the Console tab, I can now click on ONE icon and get the tooltip. Subsequent clicks on any icon do not work. This doesn't work if I open the console directly from the Develop menu at the top or use the Command-Option-C shortcut.

indigoxela commented 3 years ago

Just to make sure: turning "tap" off completely fixes it for you in Safari? Subsequent clicks also work as expected?

indigoxela commented 3 years ago

The change has been committed.

FTR - this setting is a workaround thing on its own (description from official docs):

tap

Enables mobile hacks for supporting instant taps (fixing 200ms click delay on iOS/Android) and touch holds (fired as contextmenu events).

There could be side effects on iOS or Android, so this needs a little more testing.

indigoxela commented 2 years ago

Seems like no severe side effects appeared. Time to close this issue.