# Stop buttons triggering zoom when they're double tapped

DevFeed: [Stop buttons triggering zoom when they're double tapped](<https://devfeed.tech/articles/stop-buttons-triggering-zoom-when-they-re-double-tapped-58522.md>)

Original publisher: [Read original article](<https://piccalil.li/blog/stop-buttons-triggering-zoom-when-theyre-double-tapped/?ref=main-rss-feed>)

Author: Andy Bell

Published: 2026-09-23T11:55:00Z

Content type: tutorial

Language: en

Sources: [Piccalilli - Everything](<https://devfeed.tech/sources/piccalilli-everything.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [browser](<https://devfeed.tech/topics/browser.md>), [Website](<https://devfeed.tech/topics/website.md>), [Web platform](<https://devfeed.tech/topics/web-platform.md>), [web-standards](<https://devfeed.tech/topics/web-standards.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [HTML](<https://devfeed.tech/topics/html.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [browsers](<https://devfeed.tech/tags/browsers.md>), [button](<https://devfeed.tech/tags/button.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [css](<https://devfeed.tech/tags/css.md>), [gestures](<https://devfeed.tech/tags/gestures.md>), [ios](<https://devfeed.tech/tags/ios.md>), [manipulation](<https://devfeed.tech/tags/manipulation.md>), [viewport](<https://devfeed.tech/tags/viewport.md>), [wcag](<https://devfeed.tech/tags/wcag.md>)

## AI overview

This tutorial explains why rapidly double-tapping buttons on mobile browsers can trigger zoom, particularly in Safari on iOS. It recommends using the CSS touch-action: manipulation rule to disable double-tap zoom while preserving panning and pinch zoom, and warns against disabling all zoom because that violates WCAG guidance.

## Source excerpt

I stumbled across this great project by Barry Prendergast. It's a web-based radio player with a lush UI. On mobile I spotted that as I was rapidly flicking through the stations to find one that was on air, the browser was zooming in and out. Here's a screen clip: Watch the video. I thought this behaviour was related to their viewport meta tag setup, but they have that set up perfectly: <meta name="viewport" content="width=device-width, initial-scale=1.0"> Now, you could prevent the zooming by adding , maximum-scale=1.0, user-scalable=no to the content attribute, but don't do that because it prevents zooming at all, which is a WCAG violation. What's actually happening here is the browser is responding to the double tap gesture, which in the case of Safari on iOS, zooms into the button element I'm tapping. Luckily there's a CSS one-liner for us that gets the job done. .button { touch-action: manipulation; } As per MDN: Enable panning and pinch zoom gestures, but disable additional non-standard gestures such as double-tap to zoom. Disabling double-tap to zoom removes the need for browsers to delay the generation of click events when the user taps the screen. This is an alias for "pan-x pan-y pinch-zoom" (which, for compatibility, is itself still valid). Let's see it in action. First, here's a couple of buttons without touch-action. Try rapidly tapping on your phone/touch device: See the Pen Buttons without touch-action applied by Andy Bell (@piccalilli) on CodePen. This link has no CodePen framing to make that easier for you Here are the same buttons with touch-action applied: See the Pen Buttons with touch-action applied by Andy Bell (@piccalilli) on CodePen. Again, here's a frameless version for you Handy!