Leaflet: marker.bindPopup() - version 1.7.1 only; on Mac Safari only - click event isn't recognized properly

Created on 6 Nov 2020  路  10Comments  路  Source: Leaflet/Leaflet

An event added via marker.bindpopup() - version 1.7.1 only using a Mac Safari (version 14 and 13) browser only - will only be recognized if one makes a _long mouse-click_ of about 1s like a long tap event. If one adds such an event via marker.on('click', function(e) {this.openPopup();}); it works properly.

bug compatibility needs investigation

All 10 comments

Possible duplicate of #7255 . The workaround of disabling the tap handler might help.

What is the best workaround you can suggest? Downgrading to 1.7.0 or something else? Or will there be a release shortly?

What is the best workaround you can suggest?

Are you using contextmenu event to capture taphold? If you aren't then just specify map option tap: false.

Otherwise try unreleased version from master.

I first noticed the issue on an Iphone. However I dont own any Iphone but someone told me that Midori on Linux has a similar browser engine. I could reproduce the bug on 1.7.0 and 1.7.1 with Midori. tap: false Does not fix the issue on Midori. 1.6.0 works great! The current master is not displaying a map at all, as there is no release in the dist folder currently and I dont know how to correctly integrate the current master.

tap: false Does not fix the issue on Midori.

Please show your exact code

Here is the exact code I am using. I did not strip anything, but it should be short enough. Please keep in mind, that twig templates are used here of course:
https://gist.github.com/NicoHood/6081f242b85466c2722f2ac5bb219381

Here is the exact code I am using.

But I do not see where you set there map option tap.

Oh right, I've removed it now. It was added at line 44 (and 39, but 44 is used)

L.tileLayer(osmUrl, {attribution: osmAttr, detectRetina: true, tap: false}).addTo(mymap);

I confirmed it again, it does not work (with Midori) and 1.7.1

Read again: tap is Map option. Not TileLayer's.

What a shame. Works now. Many thanks!

Was this page helpful?
0 / 5 - 0 ratings