I have a javascript web application that uses touch screen, browser based on webkit.
I have a problem with this:
addEventListener("mousedown", function(event){ console.log('down fired'); event.target.classList.add('down'); }, true);
When using the mouse, the target element class is added immediately when the mouse is held, but when using the touch screen, the target element class does not change when the finger is held on the element.
The strange thing is, however, the console log message is dispatched in the down event for a mouse click and press ts.
Any suggestions on how to solve this?
thanks
EDIT
I added a touchstart event listener, but it does not fire on a touch event:
addEventListener("touchstart", function(event){ cl('touch fired'); }, true);
source share