Hello there!
We noticed a discrepancy of the LCP measurement by the web-vitals library (v4.0.0) in the following scenario:
1. Visit a page
2. Go to a different tab, and then return to the initial tab
3. An LCP happens that is detected by the performance observer, but not by web-vitals
If you do not do the tab switching on Step 2, then the web-vitals and performance observer will both detect the LCP.
A few questions arise:
1. Is this the expected behavior of the web-vitals library given that I haven't really interacted with the page (no clicks and no scrolls), and the LCP happened while the tab was visible (despite it being temporarily hidden before the LCP happened)?
2. How will CRUX record the LCP in such a scenario?
Cheers,
Simeon