简体   繁体   English

Mousedown 或 touchstart 被调用?

[英]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?还有一种情况:当我使用带有 USB 鼠标的平板电脑并在浏览器上单击鼠标时会调用什么事件?

Hope you can give me the answer.希望你能给我答案。

I've checked it and here are results:我已经检查过了,这里是结果:

  • Android Chrome caused 'touchstart' Android Chrome 导致“touchstart”
  • Android FF caused 'touchstart' Android FF 导致“touchstart”
  • Android browser (4.0.*) caused 'touchstart' and then 'mousedown' Android 浏览器 (4.0.*) 导致“touchstart”然后“mousedown”
  • Android Opera caused both of them Android Opera 导致两者
  • Laptop with Windows 8 and FF and touch display caused 'mousedown' when using touch装有 Windows 8 和 FF 以及触摸屏的笔记本电脑在使用触摸时会导致“鼠标按下”
  • The same laptop with Chrome caused both of events使用 Chrome 的同一台笔记本电脑导致了这两个事件

A bit fanny.有点范。 You can check it by yourself: jsfiddle.net/z5cygsb4/2/可以自行查看:jsfiddle.net/z5cygsb4/2/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM