Bug 181954 - TouchMove event contains incorrect clientX / clientY after window scroll
Summary: TouchMove event contains incorrect clientX / clientY after window scroll
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 11
Hardware: iPhone / iPad iOS 11
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-22 14:36 PST by alexreardon
Modified: 2018-02-21 13:37 PST (History)
1 user (show)

See Also:


Attachments
Logs (308.32 KB, image/png)
2018-01-22 14:36 PST, alexreardon
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description alexreardon 2018-01-22 14:36:32 PST
Created attachment 331965 [details]
Logs

After a window scroll, the first subsequent touch move event has incorrect clientX / clientY values. This is fixed on the next touchmove event. This occurs frequently, but not every time. It looks like around 10% of the time.
Comment 1 alexreardon 2018-01-22 14:38:11 PST
This seems related to https://bugs.webkit.org/show_bug.cgi?id=32899 but it might be a seperate issue.

I can confirm the issue still occurs:

- when the events are bound in different orders
- regardless of whether it is bound in the capture phase
- regardless of whether the touchmove handler is passive or not
Comment 2 alexreardon 2018-01-22 15:57:56 PST
It looks like multiple post scroll touchmove events can contain incorrect values
Comment 3 Simon Fraser (smfr) 2018-01-22 17:24:26 PST
Can you make a small test case?
Comment 4 alexreardon 2018-01-22 18:46:51 PST
I have put one together:

https://codepen.io/alexreardon/pen/BJEaRL?editors=1111

It is fairly crude but shows the issue. Press on the drag handle and move it around. You will see that it goes up on the page on Safari + iOS11 because the clientY is getting smaller after each scroll - it is being incorrectly impacted by the window scroll.

The drag handle stays in the same place in other browsers which have the correct clientX / clientY after a scroll.
Comment 5 alexreardon 2018-01-22 19:27:55 PST
I have tested it on latest Chrome on Android and the drag handle stays in the same place (the clientX and clientY are updated correctly)
Comment 6 alexreardon 2018-01-24 13:15:56 PST
Please let me know if there is any more information you need. It would be great to see this fixed! 😊
Comment 7 alexreardon 2018-02-21 13:37:53 PST
Any update on this one?