-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Timespan incorrectly captures CLS from user input #14396
Comments
How are you resizing the page? With DevTools open and Lighthouse running I am unable to resize the page manually. |
Never-mind, I needed to resize the window not just the inspector pane. I can repro this. |
We ignore the lighthouse/core/computed/metrics/cumulative-layout-shift.js Lines 24 to 29 in 0ce84c0
Instead of the current implementation, maybe we should do this for any layout shifts that occur within the first X ms of the trace starting. |
isn't that when (real, bad) shifting is most likely to happen? Ideally the resize events that happen when a window is resized should be marked as "input" for purposes of CLS. |
Yeah, that's why we want to ignore If every LS event is triggered by some user input then the current logic will count them all. |
Ah, right. The negation here tripped me up. But why would a manual resize be limited to just the first X ms? You can resize a the windows during devtools LH audit anytime. |
We are concerned with the Lighthouse emulation resize at the start of the run being treated as a user input by LS events. Any LS event with LS events only look for user input in a 500ms window before the LS. This is where the 500ms figure comes from. |
FAQ
URL
https://web.dev/
What happened?
When running lighthouse on timespan mode and resizing a page it shows high CLS.
What did you expect?
it should be low as it is within the time window of a user-initiated layout shift, and the resizing is done by the user.
What have you tried?
No response
How were you running Lighthouse?
Chrome DevTools
Lighthouse Version
9.6.2
Chrome Version
105.0.0.0
Node Version
No response
OS
Mac
Relevant log output
No response
The text was updated successfully, but these errors were encountered: