When you want to disable "double tap to zoom" only on part of your screen (in my case, there was an image gallery that allows going to the next or previous image by tapping on the right or left side of the gallery and double tapping was interrupting the user experience), you can set pointer-events: none
on the image elements or their parents, and attach event listeners to the root element of the image gallery.
So, given the following HTML:
<header>…</header>
<ul class="slideshow">
<li><img src="…" /></li>
…
</ul>
<footer></footer>
You’d do the following in CSS:
.slideshow > * {
pointer-events: none;
}
And attach event listener to .slideshow
that doesn’t have its pointer events disabled:
document.querySelector('.slideshow').addEventListener('click', (event) {
// detect what part of the screen was clicked and go to the next
// or previous slide
})