Input doesn't work on HTML5 with iPhone (DEF-3526) (SOLVED)


I am having issues with getting input from an iPhone on html5 builds.

I have this simple “empty mobile” app on itch. It is built with Debug to get the prints but a Release version behaves the same. The only thing that I have changed is that I have added a script to print the input and change position of the logo. It works as it should on mac/windows but on iPhone the action_id is nil.

function init(self)".", "acquire_input_focus")

function on_input(self, action_id, action)
	print("action_id == ", action_id)
	if action_id == hash("click") and action.pressed then
		print('action_id == hash("click") and action.pressed - OKAY!')
		go.set_position(vmath.vector3(action.x, action.y, 0), "/go1")

I tried other Defold games, I stumbeled upon Ben James Word Worm and on that it accepts the input. I downloaded the source for it and built it with 1.2.147 and the input stopped working. I asked Ben and he said he simply uploaded the “raw” html build. His setting for Word Worm is also identical to the Empy Defold project.

Am I missing something to be able to get input from iPhones on my html5 builds?

Here is the EmptyProject (2.5 MB) files if you want to verify everything.


Maybe it’s better to use touch triggers in your input_bindings ?


And if you built with 1.2.146 it worked?


Maybe it’s better to use touch triggers in your input_bindings ?

Unfortunately it doesn’t help, I have tried multi-touch, mouse-button-left and mouse-button-1.

And if you built with 1.2.146 it worked?

I have tried on 147, 146, 145 and 142. They all give me action_id == nil


But wait, you will get action_id == nil for mouse movement and action_id ~= nil when you press/release mouse button. And you are expecting action_id to not be nil while the finger touches the screen as you would for a native iOS build?


I am expecting action_id to be what mouse-button-left is assigned to when clicking on HTML5 including on an iPhone. Please understand that it works fine on on Android, Mac and Windows. It is only on iPhone that the behaviour is different. Hence the title.

I might be missing something obvious. So if someone could just download the Zip file and take a look I would be very graceful.


HTML5 builds input is still not working on iOS devices. Have this been looked into?


Not yet I’m afraid. I’ve made a note to investigate tomorrow.


Could you upload the test project pls?


There is a link in it in the first post but here it is again


This is zip with bundle of the game, but I’m asking for the project.


Oh! I must have uploaded the wrong zip, sorry about that! (201.0 KB)


Ok, it seems like everything is fine with your example and with Defold as well.
You can test your example here:

I’ve tried to embed WormWorm the same way as your game embedded and input doesn’t work too:

Also, your example works on
File has uploaded using next settings:


Okay - so this is definetly itch doing something. Becaue your website works fine, but not your


yea, moreover it works when I’m logged in and doesn’t work after logout:


And Word Worm is working regardless of being logged in our out.

I did ask Ben about it when I notice this and he said the following

I don’t do anything special before uploading to I use the same ZIP package made for the Defold community page - that is, the game in a directory then zipped up.

Here are they settings for Word Worm on - I hope it helps!


I notice in the video that even though it works it still give that weird “selected canvas” thing where it darkens it. On your website it doesn’t do that.


Just want to confirm, that I’ve faced the same issue on iOS and HTML5 builds made by Defold and uploaded to Faced it somewhere in December, 2018 and don’t remember if I wrote about it on forum, it seems I did not. I’ve checked few other HTML5 games on and the bug reproduced in every Defold games I’ve found but did not reproduced in non-Defold games.

But I did not dig deeper, as it’s not my target platform, just put a Notice and direct link to index.htm on itch’s CDN (you can find it in page sources). Pure page works as expected, there is something in Itch’s JS and wrappers, I think. Hope you’ll find the real reason.


Fixed in 1.2.149