Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

StreetView panorama does not render in Shadow DOM #19

Open
1 of 2 tasks
stillgbx opened this issue Jul 15, 2016 · 5 comments
Open
1 of 2 tasks

StreetView panorama does not render in Shadow DOM #19

stillgbx opened this issue Jul 15, 2016 · 5 comments

Comments

@stillgbx
Copy link

stillgbx commented Jul 15, 2016

Description

StreetView panorama does not render in Shadow DOM.
Rendering is ok in Shady DOM.

Expected outcome

The StreetView panorama.

Actual outcome

Nothing, the "map" div seems to be deleted.
capture d ecran de 2016-07-15 12 02 32

Live Demo

https://jsbin.com/quyaji/edit?html,output

Steps to reproduce

  • Set the dom Polymer option to 'shadow'.
  • Add google-streetview-pano custom element.

Browsers Affected

  • Chrome
  • Firefox

Additional notes

The same result occurs when using google-map custom element and switching to StreetView, with the default control or programmatically.

@stillgbx stillgbx changed the title StreetView panorama does not render in Shadow DOM mode StreetView panorama does not render in Shadow DOM Jul 15, 2016
@stillgbx
Copy link
Author

see also GoogleWebComponents/google-map#314

@robdodson
Copy link
Contributor

I think this might be a Maps API issue and have reached out to the team to see about getting https://code.google.com/p/gmaps-api-issues/issues/detail?id=11109 reopened

@robdodson
Copy link
Contributor

Looks like https://code.google.com/p/gmaps-api-issues/issues/detail?id=11109 has been marked as Accepted and the team is now working on it. The bug is because the Maps API needs to measure the node ahead of time but it can't tell that the node is connected to the DOM already (it's using document.contains(), which doesn't cross the shadow boundary) so it attaches the node to the DOM itself but after doing so it's unable to insert it back into the Shadow DOM. Looks like there may be a solution but they're still working on it. I'd suggest subscribing to that CRBug for updates.

@ebidel
Copy link
Contributor

ebidel commented Jan 12, 2017

It looks like this is marked as fixed internally. Not sure when that will actually land in a maps api v3 release though.

@robdodson
Copy link
Contributor

Looks like this is fixed if we switch to the v3 experimental api
https://code.google.com/p/gmaps-api-issues/issues/detail?id=11109

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

No branches or pull requests

3 participants