Drupal Leaflet map shows only on Safari

Created on 30 June 2025, 13 days ago

I’m facing a persistent issue with Leaflet maps in Drupal 10.
The map displays perfectly in Safari.
In Chrome, Firefox, and Edge, the map area stays grey (both in Layout Builder field block and Leaflet Views block).
OSM tiles load in network requests (status 200), and they open fine in the browser.
The Leaflet library loads fine (L.version = 1.9.4).
No errors appear in the JS console related to Leaflet.
I have another Drupal 10 site configured almost identically, and there, the maps work perfectly under all browsers.
Has anyone encountered this issue where Leaflet maps stay grey under all browsers except Safari?
Is there any Drupal module, theme, or setting that could cause Leaflet not to initialize properly? Lazy loading?
Any suggestions for further debugging?

Thanks a lot for any help.

šŸ› Bug report
Status

Active

Version

10.3

Component

Miscellaneous

Created by

šŸ‡«šŸ‡·France Toki Caen, Normandy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Toki
  • šŸ‡®šŸ‡¹Italy itamair

    thanks @toki for reporting this, and sorry that you are experiencing this issue ...

    It looks pretty weird because it is happening to you ONLY on Safari, that lately cannot be considered the most solid browser among the others, and also because that is happening to you ONLY on that specific Drupal application / website.

    As you can see from these Leaflet Demo Pages:
    https://www.geodemocracy.com/drupal_geofield_stack_demo/web/geoplaces-ma...
    https://www.geodemocracy.com/drupal_geofield_stack_demo/web/geojson-map-...

    Drupal Leaflet map show correctly on Chrome, Firefox, Safari, etc,

    and due to what is say here:

    I have another Drupal 10 site configured almost identically, and there, the maps work perfectly under all browsers.

    this doesn't really look a bug of the Drupal Leaflet module, but almost certainly a singular configuration or app state for that specific one from you.

    So I am moving this from Bug Report to Support Request ...

    Does this happen to you both on the local and live environments? Or only in the live / production environment?
    May be you should also try with Incognito mode?
    and indeed check and detailing debug what is preventing your Leaflet map to load only on some browsers ...

  • šŸ‡«šŸ‡·France Toki Caen, Normandy

    Thank you for your detailed reply.

    While trying to find what prevented the map from appearing, I ended up seeing that if I deactivated my contributor theme and switched to Olivero, the map would be displayed on all browsers.

    I have contacted the theme authors to see if they had an idea.

    I will keep you informed if I have an answer to this problem.

Production build 0.71.5 2024