e.touches or e.changedTouches at touchend has no values
Categories
(DevTools :: Responsive Design Mode, defect, P3)
Tracking
(firefox-esr68 unaffected, firefox75 wontfix, firefox76 wontfix, firefox77 fixed)
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox75 | --- | wontfix |
firefox76 | --- | wontfix |
firefox77 | --- | fixed |
People
(Reporter: ooijunxiang0959, Assigned: mtigley, NeedInfo)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0
Steps to reproduce:
add event listener touchend and log the event object.
Actual results:
touches and changedTouches has no values
Expected results:
those should return a touchList
Comment 1•5 years ago
|
||
Hi ooijunxiang!
Could you please add more exact steps to test this.
Also, you can try to reproduce this problem on the latest Firefox Nightly and tell us your input. You can download it from here: https://nightly.mozilla.org/
Reporter | ||
Comment 2•5 years ago
|
||
alri(In reply to Marcela from comment #1)
Hi ooijunxiang!
Could you please add more exact steps to test this.
Also, you can try to reproduce this problem on the latest Firefox Nightly and tell us your input. You can download it from here: https://nightly.mozilla.org/
alright will try and tell the result here
Comment 3•5 years ago
|
||
I am experiencing the same bug in:
- Firefox 73.0.1
- Firefox Developer Edition 74.0b6
- Firefox 75.0a1 (2020-02-22)
I think e.touches
is always empty with the touchend
event. The e.changedTouches
property should not be empty though. It should list all last touches instead:
For the
touchend
event, it is a list of the touch points that have been removed from the surface (that is, the set of touch points corresponding to fingers no longer touching the surface). - https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/changedTouches
So it seems like the current behavior is not intended.
Comment 4•5 years ago
|
||
Using mozregression I found the commit that is responsible for this behavior:
2020-02-23T00:37:42: INFO : Narrowed integration regression window from [d32c29ee, 10ed3627] (3 builds) to [2a832a6a, 10ed3627] (2 builds) (~1 steps left)
2020-02-23T00:37:42: DEBUG : Starting merge handling...
2020-02-23T00:37:42: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=10ed362716f0c03160f700bbeb4e3f5d832c67b0&full=1
2020-02-23T00:37:43: DEBUG : Found commit message:
Bug 1588438 - Refactor deprecated touch event APIs. r=ochameau
This revision refactors RDM's touch simulator to use modern touch web APIs where possible.
Differential Revision: https://phabricator.services.mozilla.com/D50147
2020-02-23T00:37:43: DEBUG : Did not find a branch, checking all integration branches
2020-02-23T00:37:43: INFO : The bisection is done.
2020-02-23T00:37:43: INFO : Stopped
Reporter | ||
Comment 5•5 years ago
|
||
Steps to reproduce:
- have events 'touchstart' and 'touchend' on an element.
- open dev tools and toggle responsive design mode
- trigger and log the event and find 'touches' or 'changedTouches' property
- it should return a value but instead it is blank. ( other browsers work but not firefox )
Comment 6•5 years ago
|
||
I changed product and component..
DOM: Core & HTML team, if this is not the right component please feel free to route this ticket to the corresponding team, thanks!
Do you have a test case for this?
I was going to open "Touch Simulation in Responsive Design Mode of Developer Tools does not define changedTouches in touchend", then was suggested this issue.
I think it might be limited to the touch-simulator, as the error does not occur with actual touch events (with or without Touch Simulation).
The error message I get:
TypeError: e.changedTouches[0] is undefined
<anonymous> test.html:909
sendTouchEvent resource://devtools/server/actors/emulation/touch-simulator.js:364
handleEvent resource://devtools/server/actors/emulation/touch-simulator.js:277
https://jsfiddle.net/Lyvwb4f3/ can be used to test, it does console.log(e.changedTouches[0]);
on touchend
of the red div (it was originally created for my other bug report).
Comment 10•5 years ago
|
||
Please file devtools related issues separately.
As far as I know, touch simulation doesn't use basically any of the core touch event handling code.
Comment 11•5 years ago
|
||
Or is this bug all about devtools?
If that is the case, then the component is wrong.
Comment 12•5 years ago
|
||
The component is wrong. This should belong to „DevTools“ → „Responsive Design Mode“ because that’s where the touch events get simulated but lack the list of changedTouches for some versions now. Please see my mozregression output for more details on the cause of this bug.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 13•5 years ago
|
||
We'll use the fiddle at https://jsfiddle.net/Lyvwb4f3/ as a testcase.
Assignee | ||
Comment 14•5 years ago
|
||
This issue looks to be fixed when Bug 1625934 landed in Nightly. So I'll be closing this. Feel free to re-open if this is not the case.
Updated•5 years ago
|
Updated•5 years ago
|
Description
•