How can double-tap zoom be disabled on Safari mobile?
There are some rules for default behaviour: With text it somehow depends on font-size. Other types of elements also allow to be double tapped and usually perform a zoom then (e. g. img).
But the entire double-tap zoom should be disabled.
These were common approaches:
touch-action: manipulation
to *
; does not work at all.touch-action: none
to *
; seems to disable zooming back out from the zoomed-in position…<meta name="viewport" ...>
; the browser ignores it.document.ondblclick = function (e) {
e.preventDefault();
}
That's literally it. No special tricks needed lol. Tested on Safari iOS.