I have been working on this for several days and are unable to find a solution, and are not really sure what to try next.
I have a small touch screen (320 x 240) which runs a kiosk browser (surf & xorg) running html5 / javascript.
The problem that I am facing is that using the "onmousedown" event, finger presses on buttons do not register until the finger is released, whereas with a mouse click it registers on the down-click. so effectively there is no "mousedown" event, only a "mouseup" event when using the touch screen.
I thought that the solution would be to use the javascript "touchstart" and "touchend" events, but these don't work at all despite the fact that the browser acknowledges with 'true' that it supports touch events:
$this->bbcode_second_pass_code('', '
alert( 'ontouchstart' in document.documentElement ) - true
document.getElementById("but").addEventListener("touchstart", function(){
alert('touchstart');
}, true);
')
But I have read elsewhere that some browsers will report a "false true" when in fact it is not supported.
Because of this problem, the user cannot tell if the button press was successful as the button style does not change when pressed.
I have tried this with a diffrent browser with the same results, and so I am starting to think that this may be related to the way that xorg sees and handles the touch events.
Any help or suggestions would be appreciated !