Skip to content
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

Attribution not visible when using Shadow Dom #7814

Closed
hormesiel opened this issue Jan 24, 2019 · 3 comments
Closed

Attribution not visible when using Shadow Dom #7814

hormesiel opened this issue Jan 24, 2019 · 3 comments

Comments

@hormesiel
Copy link
Contributor

hormesiel commented Jan 24, 2019

mapbox-gl-js version: v0.52.0
browser: Chrome 71.0.3578.98

When displaying a map in a Custom Element that uses Shadow DOM, the attribution isn't visible.

Link to Demonstration

(don't forget to replace <your-access-token> with a valid token in the JS code)

Expected Behavior

Attribution should be visible even if using Shadow DOM.

Actual Behavior

Attribution is not visible.

@ryanhamley
Copy link
Contributor

This appears to be a much broader issue than the attribution not showing up. The Mapbox logo doesn't show up. HTML markers and popups do not behave as expected. I created a pen that allows you to easily change back and forth between shadow DOM and no shadow DOM (just change the useShadow boolean) so we can see the behaviors here. The no shadow DOM component behaves as expected. I'm assuming this is happening because GL JS internally does not make any allowance for a possible shadow DOM when creating child elements for the map.

That said, we don't guarantee support for new specs like web components and shadow DOM and it's not clear to me how much work compatibility would require, if it would be worth it or if it's something we'd want in the main library. I'm going to close this for now as something that's probably out of the scope of the project, at least until shadow DOM and web components become significantly more mature. Thanks for using Mapbox and bringing up this issue though! It's an interesting approach to using GL JS.

@anthony-bernardo
Copy link

Is mapbox working (especially Markers) with shadow root ?

@EmilePerron
Copy link

Pinging this issue as Shadow DOM and web components have become much more mature over the past few years, with good support from every browser and quite a few libraries and frameworks being built on top of them and / or with support for them.

Is this something that you are willing to reconsider at this time, or not yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants