Wednesday, May 23, 2012

mobile webkit alert dialog breaks touch event cycle

The mobile webkits on Android and iOS both contain a bug. If you make a call to alert during a touchend event, the browser ends up in a weird state where it refires the original touch start event as soon as you touch anywhere on the display.

This has led to a bug report on mgwt:
This has absolute no effect on desktop browsers and can only be observed on mobile webkits.

From now on mgwt fixes this in all aggregated events (like Tap, LongTap, etc.) with deferred binding without any runtime penalties for unaffected browsers. Internally we are scheduling a command to be executed so that the entry of your execution is no longer the touchend event.

Of course we need to file a bug with the webkit open source project to get this fixed in the long run.