-
Notifications
You must be signed in to change notification settings - Fork 524
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
Layout viewport vs visual viewport #266
Comments
This discussion came up again as we're updating our implementation. The visual viewport seems to make the most sense, especially for things like Hero/Element Timing polyfills (e.g. @tdresser's polyfill here.) However, we're currently planning to stick with the layout viewport for compatibility reasons. Do other UAs intend to stick with the layout viewport? |
IIRC, Edge currently uses the visual viewport. We definitely should either align with them or add the option to use visual. @szager-chromium |
Sorry, it turns out I misspoke at TPAC. I thought we had resolved this by adding an option to choose whether you want visual or layout. Didn't remember it got stuck on the question for which one should be the default. #95 is where the discussion for this is. Should we dupe this to that issue? |
This issue came up in the discussion for |
Yes |
Currently in the spec it says:
This seems to imply that the default root is the layout viewport, not the visual viewport.
However, during TPAC 2017, the Web Perf WG discussed Element Timing (notes) and came to the conclusion that it would be useful to define Element Timing in terms of Intersection Observer (as a "declarative Intersection Observer"). This doesn't seem possible, however, if the default root is the layout viewport, and there's no way to use the visual viewport instead.
Should IntersectionObserver allow using either the layout viewport or the visual viewport as the root? Alternatively, is "layout viewport by default" the behavior we want?
The text was updated successfully, but these errors were encountered: