Closed Bug 1586219 Opened 5 years ago Closed 4 years ago

touch events don't get fired in shadow dom

Categories

(DevTools :: Responsive Design Mode, defect, P3)

70 Branch
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lijiahao99131, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [rdm-reserve])

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

  1. Write a component that enables shadow dom encapsulation, I've tried to do this with Lit-Element and Angular, but I guess it's a problem with any shadow dom encapsulated custom elements.
  2. Listen to either touch event of an element inside the shadow dom ('touchstart', 'touchmove', 'touchend').
  3. Open devtools, open responsive design mode with touch simulation on.
  4. Click on the element (simulates touchstart), click on the element and move mouse pointer (simulates touchmove), click on the element and then release mouse pointer (simulates touchend).

Actual results:

Nothing happens, the event doesn't get fired.
The event (of elements inside shadow dom) gets fired in Chrome devtools. The event gets fired if we're listening to a touch event on a light dom (e.g. document) in Firefox devtools. But the event won't get fired if we're listening to a touch event on an element inside shadow dom in Firefox devtools.

Expected results:

The event should get fired.

Thank you for filing. We have a number of RDM touch bugs, unfortunately. This one may be more about our event handling.

If you can upload a testcase, that would be helpful. Otherwise, it looks like we have enough information to construct one.

Priority: -- → P3
Whiteboard: [rdm-reserve]

Here's a testcase: https://codepen.io/rikakomoe/pen/GRRpmjw

Cheers

Tested this with the above test case in Firefox Nightly 77.0a1 (2020-04-14) (64-bit). Looks like this issue was fixed at some point while we were re-working the touch-simulator.

Will mark as fixed. Please feel free to open if this is not the case.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.