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

Layout shift reported without actual visual shifting for resized fixed iframe #11431

Open
Andarist opened this issue Sep 14, 2020 · 1 comment

Comments

@Andarist
Copy link

Provide the steps to reproduce

Create a fixed iframe that is being resized with an element with it that has also a fixed positioning to stick it to the right edge.

screencast 2020-09-14 12-06-54

The border has been added on the outer element to visualize what is changing (the fixed container of the iframe on the page).

What is the current behavior?

CLS is being reported.

What is the expected behavior?

No CLS should be reported here - there is no visual effect for the user.

I understand that the use case here is very specific, but it shows that the current heuristics do not account for more complex scenarios. It's not sufficient to compute the layout shift of the element in relation to its viewport - the computation should account for nested frames.

@patrickhulce
Copy link
Collaborator

Thanks for filing @Andarist! Are you able to reproduce these layout shift events using the standard layout instability API?

If so, I'm sure they'd appreciate an issue discussing this edge case, and Lighthouse will end up respecting whatever the standard accepts.

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

4 participants