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

🐛 Wait for AmpDoc to fully load before creating default lightbox gallery element. #19778

Merged
merged 1 commit into from Dec 11, 2018

Conversation

sparhami
Copy link

@sparhami sparhami commented Dec 11, 2018

We need to wait for two reasons:

  1. Appending an element to the end of the body causes other elements to upgrade too early (amp-carousel breaking when used with <amp-lightbox-gallery> and type="slides" #19728)
  2. There might be an <amp-lightbox-gallery> further down on the page

Fixes #19728
Fixes #18220

Copy link
Contributor

@aghassemi aghassemi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet

});
// Make sure to wait for the ampdoc to finish loading, see:
// https://github.com/ampproject/amphtml/issues/19728#issuecomment-446033966
return ampdoc.whenReady()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick action on this issue :)

@aghassemi
Copy link
Contributor

Also fixed related #18220

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

Successfully merging this pull request may close these issues.

None yet

4 participants