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

renderOutsideViewport => false breaks Carousel rendering #2912

Closed
mkhatib opened this issue Apr 14, 2016 · 2 comments
Closed

renderOutsideViewport => false breaks Carousel rendering #2912

mkhatib opened this issue Apr 14, 2016 · 2 comments

Comments

@mkhatib
Copy link
Contributor

mkhatib commented Apr 14, 2016

As far as I can tell this is recent behavior but maybe has been there for awhile.

Reproduce:

  1. Run local server
  2. Open carousel example
  3. Navigate the carousel or the slider to jump to the YouTube element
  4. Notice that it will never be scheduled for rendering and hence the iframe is never created (You'll only see the thumbnail placeholder).

Tested this with amp-vine which seems to have the same behavior when renderOutsideViewport => false, i.e. it won't render in the carousel.

Dropping the renderOutsideViewport seems to fix this though haven't done a lot of debugging to pinpoint what is the problem.

@mkhatib
Copy link
Contributor Author

mkhatib commented Apr 14, 2016

More debugging shows that isInViewport returns false when the element is actually in the viewport.

@mkhatib
Copy link
Contributor Author

mkhatib commented Apr 14, 2016

Found the problem. Both carousel and slider were scheduling layouting before they update that the slide is now in viewport. Changing the order fixes it.

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

No branches or pull requests

1 participant