Closed Bug 1505321 Opened 11 months ago Closed 6 months ago

[Pointer Event] https://patrickhlauke.github.io/touch/particle/3b/ with multiple touches doesn't work as smooth as other browser

Categories

(Core :: User events and focus handling, defect, P3)

63 Branch
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: admin, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached file spy.txt
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0

Steps to reproduce:

- Use firefox with a touch display
- Open https://patrickhlauke.github.io/touch/particle/3b/
- Click the circle
- Press one of the four circles with the first finger (do not release it)
- Press another circle



Actual results:

The second down is recorded on the first down id


Expected results:

The second down should be recorded as a new down.

Using SpyXX shows that the window receives two different pointer events (see attached file spyxx.txt)
It also works fine in the latest chrome
Component: Untriaged → DOM: Events
Product: Firefox → Core
Hi Tim, unfortunately, I don't have a device to check this. Would it be possible for you to confirm it?
Flags: needinfo?(tihuang)
Priority: -- → P3
Sorry for late response. Unfortunately, I don't have a device to confirm this as well. Could you help on this, Edgar?
Flags: needinfo?(tihuang) → needinfo?(echen)
Blocks: pointerevent
I recall that there was one related issue bug before... maybe bug 1305346?
See Also: → 1305346
We'll need to have someone own this. Working towards the plan.
Flags: needinfo?(echen)
Component: DOM: Events → Event Handling

For the comment #0 case, we do assign a different pointerId for each second down, but we fire an additional pointerdown event for first touch (which is not released yet). Chrome only fire one pointerdown event. Maybe the page receives the event for first touch, so it thinks the pointerId isn't changed? I will try to fix this to see if it makes page works as expected.

Depends on: 1521082

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

For the comment #0 case, we do assign a different pointerId for each second down, but we fire an additional pointerdown event for first touch (which is not released yet). Chrome only fire one pointerdown event.

Filed bug 1521082. Comment #0 is improved a bit. but still doesn't as smooth as Chrome or Edge.

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

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

For the comment #0 case, we do assign a different pointerId for each second down, but we fire an additional pointerdown event for first touch (which is not released yet). Chrome only fire one pointerdown event.

Filed bug 1521082. Comment #0 is improved a bit. but still doesn't as smooth as Chrome or Edge.

Thank you for taking a look at this issue and fixing it (in partial).

However I found an issue when trying to test your changes in the latest nightly.

The problem seems that when you call preventDefault() on a event, "pointermove" will only be detected for one finger.

Steps to repeat (Requires a touch input):

  • Open https://marci4.github.io/firefox/pointerevents/preventdefaultandmove.html
  • Put one finger inside the left rectangle, and one inside the right rectangle and move both fingers together down/up.
    Is: Only the move of one rectangle (left or right) is getting detected
    Should: Boths for both rectangles should be getting detected
    When I am not using preventDefault() everything is getting detected correctly.

If you need any more information, feel free to ping me!

Best regards,
Marcel

Blocks: 1524251
No longer blocks: 1524251

(In reply to Marcel Prestel from comment #7)

However I found an issue when trying to test your changes in the latest nightly.

The problem seems that when you call preventDefault() on a event, "pointermove" will only be detected for one finger.

Thanks for reporting this, file a separated bug 1524251.

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

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

For the comment #0 case, we do assign a different pointerId for each second down, but we fire an additional pointerdown event for first touch (which is not released yet). Chrome only fire one pointerdown event.

Filed bug 1521082. Comment #0 is improved a bit. but still doesn't as smooth as Chrome or Edge.

I quickly ran a trial build including a fix for bug 1323400, it now works as smooth as Chrome or Edge for comment #0 case.
But it still doesn't help comment #7 case (which is now tracked by bug 1524251).

Depends on: 1323400
Summary: The pointerId of a PointerEvent is not unique → [Pointer Event] https://patrickhlauke.github.io/touch/particle/3b/ with multiple touches doesn't work as smooth as other browser

Reproduced on Lenovo Yoga C630-13Q50 with Windows 10 Home (v1803) on latest Nightly aarch64 build.

Component: Event Handling → User events and focus handling

Per comment #9, I think we could close this bug. Feel free to reopen it or file a new bug.

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