Fixing an issue with scroll-snap on iOS

On one of our sites we have a grid of article thumbnails that becomes horizontally scrollable on mobile, and we’ve used scroll-snap on the container element to give a more carousel-like feel and make sure that the list always snaps to the edge of one of the items.

Our QA team raised a bug on certain iOS devices where the list would always snap back to the first item and not scroll through as the user expected.

After a fair amount of head scrartching this was fixed by adding

-webkit-overflow-scrolling: touch;

to the container element.