简体   繁体   English

使用IE10和Windows 8捕获移动事件

[英]capturing move events with IE10 and windows 8

I'm trying to capture signatures using a html5 client on windows 8 touchscreen tablet. 我正在尝试使用Windows 8触摸屏平板电脑上的html5客户端捕获签名。 I've tried using http://github.com/thomasjbradley/signature-pad , but rather than the smooth curves it captures on the desktop with a mouse, it only captures the occasional dot . 我尝试过使用http://github.com/thomasjbradley/signature-pad ,但不是用鼠标在桌面上捕获的平滑曲线,而是只捕获偶尔出现的点。

I set up a html5 canvas and brushed a finger over it on the tablet, capturing mouse over, mouse enter and mouse down. 我设置了一个html5画布,并在平板电脑上用手指轻扫它,捕捉鼠标,鼠标输入和鼠标按下。

It seems only the start of the movement sets off mouse enter/ mouse over events. 似乎只有运动的开始才能将鼠标输入/鼠标置于事件之外。

I tried again with a stylus and got the same result. 我用手写笔再试一次,得到了同样的结果。

I tried using a line of a hundred or so divs, same result. 我尝试使用一百个左右的div,同样的结果。

Tried using chrome instead, same result 尝试使用铬,相同的结果

This makes sense (sort of) as the tablet doesn't have a mouse, but I need to capture the mouse move events of a pressed finger/stylus to capture a signature. 这是有道理的(有点),因为平板电脑没有鼠标,但我需要捕获按下的手指/手写笔的鼠标移动事件来捕获签名。

Has anyone solved this ? 有人解决了这个吗?

-ms-touch-action: none;

Just add that to signaturepad.css file on the .sigWrapper and the thomasjbradley control should work. 只需将其添加到.sigWrapper上的signaturepad.css文件中,并且thomasjbradley控件应该可以正常工作。

It appears the touch events that IE10 is registering to is breaking the event listeners for the mouse events on that control. IE10正在注册的触摸事件似乎打破了该控件上鼠标事件的事件监听器。

Try these events MSPointerDown, MSPointerMove, MSPointerUp and many more mentioned here http://msdn.microsoft.com/en-in/library/windows/apps/hh465891.aspx 尝试这些事件MSPointerDown,MSPointerMove,MSPointerUp以及此处提到的更多内容http://msdn.microsoft.com/en-in/library/windows/apps/hh465891.aspx

These events work in Windows Phone 8 but I am not sure if they work in Windows 8 Tablet. 这些事件在Windows Phone 8中有效,但我不确定它们是否适用于Windows 8 Tablet。

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

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