Chrome's synthetic mouse event doesn't support multi-touch mode very well
Reported by
ctengc...@gmail.com,
May 25 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0 Steps to reproduce the problem: 1. Find a computer/notebook with mouse inout and multi-touch screen support 2. First, mouse click(down) on Div 1, and hold 3. Then touch the Div 2 via touch screen 4. Release the finger 5. Mouse up on Div 1 What is the expected behavior? There should trigger a mouseup event on div 1, but it didn't What went wrong? Only 3 events: mousedown on div 1, mousedown & mouseup on div 2 Did this work before? N/A Does this work in other browsers? N/A Chrome version: 58.0.3029.110 Channel: stable OS Version: 10 Flash Version: This problem is found on a car box platform with embedded linux + chromium M30 (customed) Since mouse events are in fact synthetic from touch events, i believe there was a long-standing bug ...
,
May 25 2017
I also tried Chrome M59 on Windows, the bug doesn't reproduce.
,
May 26 2017
Hi, i re-tested on M57, it shows 2 mouseup events, but both on "Div 2", -- which i don't know is ok or wrong 2017-05-26 3:55 GMT+08:00 mus… via monorail < monorail+v2.2341872843@chromium.org>:
,
May 26 2017
Thank you for providing more feedback. Adding requester "majidvp@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 26 2017
Re-test on M58 stable & M59 beta, problem still there. 1, First, press mouse on div 1, and hold, you'll see mousedown on div 1 triggered; 2, Then, put finger on touch screen quickly on div 2, console log outputs mousedown & up on div 2; 3, Then, release the mouse No mouseup on div 1 shows. And what is interesting to me, the mouse cursor's position wierdly moved to div 2, it is previously on div 1. 2017-05-26 19:33 GMT+08:00 小鱼儿 <ctengctsh@gmail.com>:
,
May 26 2017
Sorry, typo. My chrome on windows is previously M58, and today i just installed M59 beta to verify. There are currently 2 results: result #1: 2 mouseup events triggered, but both event.target element seem to the second one or result #2: only 1 mouseup event triggered,the first element didn't receive the mouseup 2017-05-26 19:40 GMT+08:00 小鱼儿 <ctengctsh@gmail.com>:
,
May 26 2017
If i touch 2 div's using 2 fingers on the multi-touch screen, then no synthetic mouse events will be triggered. -- Which i can't say is right or wrong, but at least it's consistent..... 2017-05-26 19:46 GMT+08:00 小鱼儿 <ctengctsh@gmail.com>:
,
May 26 2017
We send mousedown/up events for touch tap to make legacy websites work, and have stopped sending them for long-tap etc recently. I suspect we never sent them for two-finger taps. There is no perfect solution here: legacy mouse behavior assumes a single mouse pointer, and we are trying to preserve the old behavior for multiple pointers here (mouse+touch or 2-touches) which is hard. Also: we can never guarantee mousedown/up pairing even with a single mouse. You can drag out from a page and release the button outside, for example. For multiple pointer cases you mentioned, we recommend using PointerEvents where each pointerdown/up/move/etc event has a unique pointerId so it's easy to differentiate between pointers (mouse/touch/pen).
,
May 26 2017
I replaced mousedown/up by pointerdown/up, the same problem, so "unique pointerId" doesn't apply. Also, you mean "longtap doesn't trigger mouseup reliably"? I thought here was a usability miss: mutlti-touch is basically used for "gesture detection", but the W3C guys didn't consider the old plain legacy use. Also, i can't agree with you. "legacy mouse behavior" can be extended in multi-touch mode, & we should consider the final user special case, to maximize the usability, not just falling adhered to an incomplete spec. If there is mousemove after intial mousedown, the i thought mouseup doesn't trigger is a good design: since if there is a pair of mousedown/up, there will be a "click", the usees usually apply this principle to cancel the click in UX ops. But in this case, there is no mousemove, only a "longtap" gesture, so theoretically it's differentiatable? 2017-05-27 4:43 GMT+08:00 mus… via monorail < monorail+v2.2341872843@chromium.org>:
,
May 29 2017
pointerup/down: I meant pointerIds infer which pointer went down/up, which is an improvement over legacy MouseEvent. mouseup on longtap: a longtap fires contextmenu event, so should never fire a click. Moreover, we don't know of any browsers doing it. (Firing auxclick when contextmenu event gets prevented is a possibility though.) Legacy mouse on multitap: This is a harder problem than it seems. PointerEvent spec addresses this but only as a recommendation: https://w3c.github.io/pointerevents/#tracking-the-effective-position-of-the-legacy-mouse-pointer For example, what should happen to mouseenter/leave events (which must bracket every mousedown/mouseup) if two fingers are dragged on two different divs? What the PointerEvent spec suggests is a long sequence of enter/leave/move sequence (leave@div1, enter@div2, move@div2, leave@div2, enter@div1, move@div1, ...) which is not great but there seems to be no good solution. A related problem with multitouch/multipointers is that the visible mouse cursor movement is OS dependent, and to the best of our knowledge, only new Windows apps (those using WM_POINTER handlers) handle them perfectly: mouse cursor hides without losing its position when a new pointer (touch/pen) is active. The single-mouse-pointer model in the legacy case is broken in this case. In Linux/Mac, the mouse cursor always jumps to last active pointer so the legacy model makes sense. But it has other problems: e.g. Mac doesn't even have a way to identify a pointer at the OS level when e.g., a pen pointer leaves the digitizer range. For all of this, tweaking legacy mouse events for multitouch is not a priority for us. |
|||
►
Sign in to add a comment |
|||
Comment 1 by majidvp@chromium.org
, May 25 2017Labels: -OS-Windows Needs-Feedback OS-Linux