New issue
Advanced search Search tips

Issue 675901 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

pointermove target is not updated on touch

Reported by mbelh...@kapit.fr, Dec 20 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

Steps to reproduce the problem:
You need a touch screen to reproduce this bug
Drag your finger between to elements and you wil notice that the pointer move target will remain the target of the first pointerdown.

you can easilly reproduce it here https://jsfiddle.net/vhsr02wu/
try to move the mouse between the red and blue square and see the target changes. Do the same thing with touch and the target will not change.

What is the expected behavior?
The pointermove target should be updated in touch.

What went wrong?
the pointermove target is not being updated correctly

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 55.0.2883.87  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 24.0 r0

We used the PEP polyfill before this landed in Chrome 55 and it worked.
 
Cc: mustaq@chromium.org dtapu...@chromium.org rbyers@chromium.org nzolghadr@chromium.org
Status: WontFix (was: Unconfirmed)
Thanks for logging the issue however this is actually expected behavior.

The pointer events spec changed the model for touch to be implicit capture mainly for performance reasons. See this issue for the details:
https://github.com/w3c/pointerevents/issues/8

Chrome currently ships this model, Edge will ship it in a new release coming. PEP; I'm not sure why it hasn't been updated yet.

Nonetheless you can release the implicit pointer capture by listening to the gotpointercapture event: See http://jsbin.com/qeqiyox/edit?html,css,js,output


Also if you call releasePointerCapture on pointerdown handler you would not notice event a thing. In other words releasing pointer on pointer down handler would cause the behavior to be exactly like no implicit capture at all without any gotpointercapture or lostpointercapture dispatched.

Comment 3 by mbelh...@kapit.fr, Dec 21 2016

thank you. calling releasePointerCapture on pointerdown restored the expected behavior for me. I needed this for drag and drop because using event.target is faster than calling elementFromPoint on every pointermove.
How have you determined that it is slower? Technically from our point of view it should be roughly the same cost. 

Comment 5 by mbelh...@kapit.fr, Dec 21 2016

I did not do performance testing in chrome 55. But back in 2015 we noticed that drag and drop was considerabely slow on chrome with touch (we are using PEP and elementFromPoint to check if we are on the correct target) so we used event.target instead of elementFromPoint and the problem was fixed. 

Sign in to add a comment