I went to play the ol' Some Adventure Guy on the new iOS4 on my 3GS (sooo many TLAs!) - but alas, my already crappy controls had become even more crappier! And it looks like a crazy change (hopefully bug) in webkit's touch handling is to blame.
So, the problem occurred when I tried to jump AND moved at the same time. A fairly common requirement for a platform game, I think you'll agree. It appeared that any time the lil' guy jumped, the left or right command would be killed dead in it's tracks. After some hunting by me and a vigilant coworker we found that the
touchend event was being fired twice whenever one finger was lifted.
Here is a minimal test case which seems to confirm the horrible - when you lift one finger from a multitouch event, all events are immediately cancelled. If you move one of the remaining touches then its touchstart event is re-fired! Oh the humanity!
The demo updates on touchstart and touchend and shows the current number of touches. If you hold down 2 or more fingers, then release one (being careful not to move the other fingers - less you re-trigger a start event) then you can see that all the remaining touches get ended. No multitouch for you.
I have a most terrifying workaround for my platform game (that not work for most people's multitouch requirements) - but I'm hoping someone can stand up and tell me I'm doing something terribly wrong and that there's an easy fix before I release it.
If it is a bug, and I were a more mis-trusting kind of a guy, I might suspect that Apple is getting scared of web apps and is doing their best to disable them! Of course, more likely is that someone forgot to run their unit tests. Right guys?