Closed Bug 1549868 Opened 5 years ago Closed 5 years ago

event.touches not accessible for capture touchmove listeners

Categories

(Core :: DOM: Events, defect)

66 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: alexreardon, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36

Steps to reproduce:

Add a capture touchmove listener. The TouchEvent.touches TouchList is populated, but values cannot be read from it.

function onTouchMove(event) {
  // in firefox touch is undefined 😬
  // in other browers touch is populated 👍
  console.log("touch move (TouchLists)", event.touches, event.changedTouches);
  console.log(
    "touch move (interator lookup)",
    event.touches[0],
    event.changedTouches[0]
  );
  console.log(
    "touch move (TouchList lookup)",
    event.touches.item(0),
    event.changedTouches.item(0)
  );
}

window.addEventListener("touchmove", onTouchMove, {
  capture: true,
  // bug is present for passive and non passive listeners
  passive: false
});

Runnable example: https://codesandbox.io/s/xokx8l4kko

Looking into the control the Symbol.interator is stating that the List has a length of 0 on the TouchListPrototype

Actual results:

Unable to retrieve TouchList values for capture listeners

Expected results:

TouchList values should be accessible

Looking into the control

Looking into the console

Component: Untriaged → Disability Access APIs
Product: Firefox → Core

(In reply to Alex Reardon from comment #1)

Symbol.interator

Symbol.iterator

The priority flag is not set for this bug.
:Jamie, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jteh)

This issue is not related to accessibiliy APIs. Changing component; apologies if this is the wrong one.

Component: Disability Access APIs → DOM: Events
Flags: needinfo?(jteh)

Hi Edgar,
Can you help take a look? I wonder if this is somehow unexpected caused by bug 1412485.

Flags: needinfo?(echen)

I don't have a device with touch screen at hand right now. I will check later once I could access it.

(In reply to Hsin-Yi Tsai [:hsinyi] from comment #5)

Hi Edgar,
Can you help take a look? I wonder if this is somehow unexpected caused by bug 1412485.

It doesn't look like something related to bug 1412485.
I could not reproduce this on recent Nightly and this bug was reported on 66, so perhaps this has been fixed?

Flags: needinfo?(echen)

(In reply to Edgar Chen [:edgar] from comment #7)

I could not reproduce this on recent Nightly and this bug was reported on 66, so perhaps this has been fixed?

But I could not reproduce this on 65 or 66, either

Hi Alex, could you try recent Nightly with clean profile to see if you still could reproduce this issue? Thank you.

Flags: needinfo?(alexreardon)

We're unable to reproduce and wait for nothing from reporter yet.
I'll close this as worksforme. Do feel free to reopen if this is still valid to you per comment 9. Thanks!

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
Flags: needinfo?(alexreardon)
You need to log in before you can comment on or make changes to this bug.