Search code examples
javascripttouchscreen

Mousedown or touchstart called?


There's one thing that disturbs me: suppose, I have a laptop with mouse and touch display. What event will be called when I touch some object in a browser on a screen? Mousedown or touchstart? And another situation: what event will be called when I use a tablet with usb-mouse and make mouse-click at the browser?

Hope you can give me the answer.


Solution

  • I've checked it and here are results:

    • Android Chrome caused 'touchstart'
    • Android FF caused 'touchstart'
    • Android browser (4.0.*) caused 'touchstart' and then 'mousedown'
    • Android Opera caused both of them
    • Laptop with Windows 8 and FF and touch display caused 'mousedown' when using touch
    • The same laptop with Chrome caused both of events

    A bit fanny. You can check it by yourself: jsfiddle.net/z5cygsb4/2/