Can double tap be disabled for mobile devices?

G'day all,

I have an interactive musical keyboard project which works well on all platforms but if a user taps too quickly on mobile the screen zooms.

Can this be disabled to stop people from tapping and zooming accidentally.

I did some preliminary searching for an answer here but maybe I'm not using the right keywords?

Thanks for reading.


Try this:


.disable-dbl-tap-zoom {
  touch-action: manipulation;

Workes for me on iPhone...


Thanks for the reply.

I tried but it doesn't seem to work on Android.

iPad seems ok though.

Maybe I put it in the wrong place. The code goes in here right?

Screen Shot 2023-03-19 at 8.30.13 pm

Yep! And of course you have to assign the class to the element(s) where you want to avoid the double-click.

1 Like

If its working on iPad then you already have it setup correctly.

May be check you browser version on the Android

List at bottom of page

1 Like

After processing your action you could add:


Maybe that helps.

1 Like

I think I'm overloaded with information. I'm trying to translate the terminology being used in a practical sense but not getting a result.

i.e. I still have the double tap on Android issue. iOS seems to be ok.

What about something like this?

Add a class to the Head-Html:

.disabled, .disabled * {
	pointer-events: none !important;

Sorry, there was a typing error in the style definition. It´s correct now...

Function on button:

	hypeDocument.startTimelineNamed('timelineName', hypeDocument.kDirectionForward) // or what ever you want to do
		}, 500);

Works for me on iPhone. You might test this on your Android device... (15.1 KB)

1 Like

Of course, what you could do in addition:

Put the 'preventDoubleClick'-part into a separate function. This way you have to write that code only once (given you named that function 'preventDoubleClick') you would call it this way:

hypeDocument.startTimelineNamed('timelineName', hypeDocument.kDirectionForward); // or whatever you want to do //

hypeDocument.functions().preventDoubleClick(hypeDocument, element, event); // call the function (15.4 KB)

Thanks for the replies and suggestions!

I thought there might be a global project file setting to disable fast or double tapping? Does the one you showed here do that by itself?

Do all interactive items in my project need to have additional code lines to stop the zoom functionality?

What about unchecking Allow user scaling in the Mobile Options of the Document Inspector?

1 Like

Should the world really be that simple? :rofl: Works for me and my iPhone...


I'm not sure if this is working or not.

Here's my current build of the project:

Nope, unfortunately it's not working for me. What exactly did you change?

Interesting, it seems that Hype's Allow user scaling checkbox now does not have any effect in Mobile Safari, but will still work for home page web apps (and also embedded, like in Hype Reflect).

Instead I think it may be wise to go back to the top of the thread for suggestions (or to this stack overflow response that I was looking at); from my testing a solution would be to add this to your Head HTML:

body {
  touch-action: pan-x pan-y;

Note that your document already has style tags but erroneously some javascript code in it. Does that help?


I've been fiddling around so much I have no idea now ! :grinning:

Thanks for the advice Jonathan!

I don't know where to look for the Javascript code? It could be a relic going back to when I tried to convert a project from Flash to HTML5 a decade ago.

Where can I see and or eliminate the unnecessary code?


Go to the Document Inspector (command-1) and then click Edit Head HTML…. From there you should be able to eliminate the incorrect code and try the style from above.