Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google chrome Chrome、Windows 8、触发鼠标事件的touchevents_Google Chrome_Windows 8_Touch - Fatal编程技术网

Google chrome Chrome、Windows 8、触发鼠标事件的touchevents

Google chrome Chrome、Windows 8、触发鼠标事件的touchevents,google-chrome,windows-8,touch,Google Chrome,Windows 8,Touch,我有个小问题 我绑定鼠标和触摸事件,如果是触摸事件,则捕获鼠标事件并丢弃它们 我遇到了一种情况,有些东西无法正常工作,因此我输入了以下代码进行测试: this.timeLeft.on("click mousedown mouseup touchend touchstart", function(e){ console.log("##########", e.type); }); 在这种特殊情况下(可能总是这样,我没有注意到),如果我点击timesLeft,则touchend事件会在mo

我有个小问题

我绑定鼠标和触摸事件,如果是触摸事件,则捕获鼠标事件并丢弃它们

我遇到了一种情况,有些东西无法正常工作,因此我输入了以下代码进行测试:

this.timeLeft.on("click mousedown mouseup touchend touchstart", function(e){
    console.log("##########", e.type);
});
在这种特殊情况下(可能总是这样,我没有注意到),如果我点击timesLeft,则
touchend
事件会在
mousedown
事件之前触发,因此无法捕捉到这一点,因为在
touchend
上,我会停止检查鼠标事件

首先,我想确保当触摸事件发生时,鼠标事件确实会根据Windows8或chrome触发。我想确保我的代码库中没有一些我不知道的委托人


第二,是什么?这是一个糟糕的事件处理顺序实现。这是我假设的被视为“点击”的标准处理顺序吗?Chrome 32.0.1678.0 dev-m Aura解决了这个问题。对不起