Riff / Built on the open web / Behaviour

overscroll-behavior

Keeps the Up next list's scroll from moving the post behind it.

Now Playing with the Up next sheet open, listing the rest of the post's tracks
The Up next list, which scrolls on its own without pulling the post along.

How Riff uses it

The Up next list scrolls inside its sheet. contain stops the scroll chaining to the page when the list hits its end, and stops a downward pull at the top from triggering pull-to-refresh while the overlay is open.

Why

Now Playing is a fixed overlay over a post that can itself scroll. A chained scroll would move the post underneath, or reload the page mid-track.

Without it

The scroll chains to the page behind as normal.

Where

Links open the source at the commit this page was published from.

Reference: overscroll-behavior on MDN.