React-leaflet: safari not showing up the popup

Created on 31 Dec 2020  路  2Comments  路  Source: PaulLeCam/react-leaflet

Bug report

Here the peer dependencies installed:
"leaflet": "^1.7.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-leaflet": "^3.0.5",
"react-scripts": "4.0.1"

Safari version: 14.0.1

OS : OS Catalina 10.15.7

Expected behavior

To open a popup on click on the pin, as on other browsers.

Actual behavior

No popup

Steps to reproduce

Best example possible is from the documentation: this example.
Trying it on safari.

Most helpful comment

@korvus I had the same problem.
I digged a little bit and seems that comes from a Leaflet 1.7.1 bug, tracked here: https://github.com/Leaflet/Leaflet/issues/7255

Disabling the tap event should be a valid workaround even for mobile Safari.
For me is working setting the tap propery to false: in the MapContainer component

      <MapContainer
        tap={false}
        ...
      >

All 2 comments

@korvus I had the same problem.
I digged a little bit and seems that comes from a Leaflet 1.7.1 bug, tracked here: https://github.com/Leaflet/Leaflet/issues/7255

Disabling the tap event should be a valid workaround even for mobile Safari.
For me is working setting the tap propery to false: in the MapContainer component

      <MapContainer
        tap={false}
        ...
      >

Hi Francesco,
Thanks to took the time to checked the issues and reported the trick!
I confirmed this workaround fixed the operation for me.

Was this page helpful?
0 / 5 - 0 ratings