зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1738731 [wpt PR 31458] - Fix interactionId when click gets the wrong PointerId, a=testonly
Automatic update from web-platform-tests Fix interactionId when click gets the wrong PointerId Since click events sometimes do not get the correct PointerId, we use the last PointerId of a pointerdown or pointerup seen. But we also take care to reset this last seen when we see other kinds of events, to prevent the click from being accidentally attributed to an interaction in the past that did not trigger it. Bug: 1264930 Change-Id: Ieb5773f3a6c9a9cfd46b428b5a925c4535060386 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3255225 Reviewed-by: Robert Flack <flackr@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/main@{#940359} -- wpt-commits: 7a9f249672ab058dd93bab1a51930b7913d5287e wpt-pr: 31458
This commit is contained in:
Родитель
9943638524
Коммит
6410daef1c
|
@ -40,8 +40,8 @@
|
|||
assert_equals(map.get('mousedown'), 0, 'Should not have a interactionId');
|
||||
assert_equals(map.get('mouseup'), 0, 'Should not have a interactionId');
|
||||
assert_greater_than(map.get('pointerdown'), 0, 'Should have a non-trivial interactionId');
|
||||
assert_equals(map.get('pointerdown'), map.get('pointerup'), 'Should have the same interactionId');
|
||||
assert_equals(map.get('pointerdown'), map.get('click'), 'Should have the same interactionId');
|
||||
assert_equals(map.get('pointerdown'), map.get('pointerup'), 'Pointerdown and pointerup should have the same interactionId');
|
||||
assert_equals(map.get('pointerdown'), map.get('click'), 'Pointerdown and click should have the same interactionId');
|
||||
t.done();
|
||||
})).observe({type: 'event'});
|
||||
clickOnElement('button');
|
||||
|
|
Загрузка…
Ссылка в новой задаче