GoogleChrome/web-vitals-extension

Metrics reset after visibility change

rviscomi opened this issue · 1 comments

Steps to reproduce:

  1. Go to https://www.cnn.com/
  2. Change tabs to hide CNN
  3. Return to the CNN tab
  4. Click the hamburger menu on the top left of the page
    image

HUD after Step 1 and Step 3:

image

HUD after Step 4:

image

After some investigation, I don't think this bug was caused by the INP changes, but they do make the bug more easily reproducible.

You can also reproduce this using the production version of the extension. Instead of triggering INP after the page visibility change, try to trigger CLS. For example, go to https://www.nytimes.com/ and scroll down the entire page after the visibility change. There should be an increase to CLS, and LCP will be reset to 0.

Initial state:

image

After a visibility change and scrolling:

image

The expected behavior is for metrics to persist their values across visibility changes.