Closed Bug 1876213 Opened 8 months ago Closed 7 months ago

Removing element during pointerdown event stops all pointermove events

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

All
Android
defect

Tracking

()

RESOLVED DUPLICATE of bug 1695574

People

(Reporter: mozilla, Unassigned)

References

Details

Attachments

(1 file)

Attached file index.html

Steps to reproduce

  1. Open the attached HTML file in Firefox for Android
  2. Touch the red square and drag your finger around

Expected behavior

Diagnostic element updates with pointer position as your finger drags around

Actual behavior

Diagnostic element continues to say "No pointer moves detected"

Device information

  • Firefox version: 121.1.0 (Build #2015996455) 62d5117f79+
  • Android device model: Google Pixel 7
  • Android OS version: 14

Any additional information?

The core of the issue is if you remove the target element of a pointerdown event while handling said pointerdown event, no more pointermove events are sent, regardless of what element the pointermove event handler is registered on. Delaying the removal of the element by only removing it after window.setTimeout with a delay of 0 causes pointermove events to be fired properly.

I thought it might have to do with Implicit Pointer Capture, but explicitly calling releasePointerCapture on the element has no effect on behavior in any browser.

I've tested this in desktop and mobile Firefox, Chrome, and Safari, on a few devices and several operating systems.
It does not reproduce on any browser except Firefox for Android. It also does not reproduce when using the touch simulation feature in the Firefox dev tools on the desktop.

I forgot to note, once you pick up your finger and put it down after touching the red square, pointermove events fire correctly again. You will have to refresh the page to get the red square back and reproduce the issue again.

The severity field is not set for this bug.
:amejia, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(amejiamarmol)
Component: Browser Engine → Panning and Zooming
Product: Fenix → Core
Flags: needinfo?(amejiamarmol)

Now I believe the underlying issue of this bug is same as bug 1695574. FWIW, locally I confirmed D202811 fixes this bug too.

Component: Panning and Zooming → DOM: UI Events & Focus Handling
See Also: → 1695574

Masayuki, do you agree?

Flags: needinfo?(masayuki)

Yeah, should be. Our event handler stops dispatching following evevns once the target of pointerdown event whose input source is a touch device is reframed or removed.

Status: UNCONFIRMED → RESOLVED
Closed: 7 months ago
Duplicate of bug: 1695574
Flags: needinfo?(masayuki)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: