Menu

touch-action Is an Intersection: Un-trapping Page Scroll on 35 Mobile Games
πŸ“°

touch-action Is an Intersection: Un-trapping Page Scroll on 35 Mobile Games

DEV Community: cssΒ·μ–‘ν˜„μ„Β·about 9 hours ago
#QzDDDsCn
#devtocss#devto#dev#touch#scroll
Reading 0:00
15s threshold

I'm building a small site of free browser minigames. On a phone, if you put a finger on a game board and drag vertically, the page would not scroll. The board takes up 60-70% of the screen, so once you were in a game, getting down to the guide and leaderboard below it was awkward.

I caused this myself. To make touch controls work, I had put touch-action: none on the whole board. Counting afterwards, 37 components did this. This post covers the fix, how I measured it, and the parts I have not verified.

https://raw.githubusercontent.com/Piousangel/minigames-hub/main/docs/marketing/blog/2026-11-18-touch-action-scroll-trap/01-2048.png

The rule that bit me: touch-action is an intersection

My first idea was to set pan-y on the inner canvas. That does nothing.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.