Skip to content

[Bug] Map not rendered in Safari with web inspector tools open #2503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yonitou opened this issue Mar 15, 2025 · 3 comments
Open

[Bug] Map not rendered in Safari with web inspector tools open #2503

yonitou opened this issue Mar 15, 2025 · 3 comments
Labels

Comments

@yonitou
Copy link

yonitou commented Mar 15, 2025

Description

On Safari, maps from Mapbox have a lot of issues that make this package unusable :

  • The layers don't appear
  • The styles are not loading properly

Here is a very minimal MRE using Safari 18.3.1

const App = (): JSX.Element => {
  return	( 
    <Map
	mapboxAccessToken={TOKEN}
	mapStyle="mapbox://styles/mapbox/dark-v9">
    </Map>
  );
}

const container = document.getElementById("root");
const root = createRoot(container);
root.render(
	<StrictMode>
		<App />
	</StrictMode>

Results with some different styles :

With mapStyle="mapbox://styles/mapbox/dark-v9"

Image

With mapStyle="mapbox://styles/mapbox/standard" :

Image

With mapStyle="mapbox://styles/mapbox/streets-v12"

Image

Expected Behavior

The map should work normally on Safari

Steps to Reproduce

  1. Copy paste the code above
  2. Launch Safari and try it

Environment

Logs

No response

@yonitou yonitou added the bug label Mar 15, 2025
@Pessimistress
Copy link
Collaborator

Pessimistress commented Mar 17, 2025

You are not specifying any props to set the map center. What do you expect to see?

Normally, a bug report like this is not actionable unless you also check:

  • does your app work in other browsers?
  • does your browser render examples on https://visgl.github.io/react-map-gl/examples ?
  • if the answers to the previous one is "no", does your browser render the examples on Mapbox GL JS official documentation site?

@yonitou
Copy link
Author

yonitou commented Mar 17, 2025

Hi @Pessimistress,

I expect to see neither a black screen or a white earth. This is a layout issue and I just found the root cause :

  • I tried to display the examples on react map gl website and it worked
  • I copy pasted it the code of a random example (the clusters one : https://github.com/visgl/react-map-gl/blob/7.0-release/examples/clusters/src/app.tsx) on a fresh new repo and it didn't work (eg, it was the same result I had on my screenshots)
  • During this whole time, because I was trying to debug it, I had the "Inspector tools" of safari opened. At some point, by mistake, I closed it and the map just appeared like magic. I tried to do it again -> Same result

---> The correct issue is : On safari, when the map is displayed in full screen (100% width & height), the map is completely bugged when the web inspector tools is opened.

@Pessimistress
Copy link
Collaborator

Unfortunately I still cannot reproduce it with the information provided. I have tested with Safari + full screen + inspector tools open. I suspect it has to do with your particular dev environment and possibly extensions that you have installed. I'll keep this issue open in case anyone else experiences the same. As of this moment I don't see any evidence that your issue is caused by this library.

@Pessimistress Pessimistress changed the title [Bug] Urgent : Big issues on Safari [Bug] Map not rendered in Safari with web inspector tools open Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants