WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
203232
Touch events are dispatched to document element when the original target is detached and preventDefault was called for previous event
https://bugs.webkit.org/show_bug.cgi?id=203232
Summary
Touch events are dispatched to document element when the original target is d...
Xidorn Quan
Reported
2019-10-21 20:46:27 PDT
Created
attachment 381505
[details]
testcase Please see the attached testcase. In the testcase, there is a box keep detaching and attaching itself every two seconds. And there is an event handler on `touchmove` on document which logs a "D", and a handler on the box which logs "T". Steps to reproduce: 1. when the box is there, press on the box and move the finger around 2. wait until the box disappears, and move the finger around Expected result: You should see TTTT being logged because the touch event should goes to where it starts (which is the box). Actual result: You would see DDD being logged because the touch event gets to the document element instead. This behavior doesn't match the spec, and any other implementation. Also this only happens when there is `e.preventDefault()`. If you remove that line, then it correctly logs TTTT indicating the events go to the box.
Attachments
testcase
(783 bytes, text/html)
2019-10-21 20:46 PDT
,
Xidorn Quan
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Xidorn Quan
Comment 1
2019-10-21 20:47:33 PDT
Also this is something new in iOS 13, and it doesn't happen on iOS 12.
Radar WebKit Bug Importer
Comment 2
2019-10-23 15:32:57 PDT
<
rdar://problem/56557577
>
Antoine Quint
Comment 3
2019-10-24 02:07:57 PDT
As far as I know, our implementation of touch events isn't meant to match any particular specification. You say there's a behavior change between iOS 12 and 13 and that's worth investigating. We now implement Pointer Events. Do you see similar behavior with Pointer Events?
Xidorn Quan
Comment 4
2019-10-24 15:59:21 PDT
> As far as I know, our implementation of touch events isn't meant to match any particular specification. You say there's a behavior change between iOS 12 and 13 and that's worth investigating.
I think the touch events behavior is covered by Touch Events spec
https://www.w3.org/TR/touch-events/#the-touchmove-event
which stats:
> The target of this event must be the same Element on which the touch point started when it was first placed on the surface, ...
which matches all other browsers as well as iOS 12.
> We now implement Pointer Events. Do you see similar behavior with Pointer Events?
I haven't tried yet, and I'm not quite familiar with Pointer Events, but will have a look. Actually I was a bit surprised that you decided to implement Pointer Events, as I thought WebKit was publicly against this.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug