Non-passive scroll listener

bp/passive-listenerwarningperformancelighthouse

Why it matters

The browser waits for a touch or wheel listener before every scroll frame unless it is passive (Lighthouse: does not use passive listeners to improve scrolling performance).

Fix

Pass { passive: true } when the handler never calls preventDefault().

Credit

  • From Google Chrome

    Lighthouse recommends passive listeners so touch and wheel handlers do not block scrolling.

References

See it