Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mousemove_prevent_default_action.tentative.html checks the event sequence of mousemove and dragstart events #396

Closed
EdgarChen opened this issue Aug 23, 2023 · 5 comments · Fixed by web-platform-tests/wpt#42538
Labels
focus area: Pointer and Mouse Events test-change-proposal Proposal to add or remove tests for an interop area

Comments

@EdgarChen
Copy link
Member

EdgarChen commented Aug 23, 2023

Test List

https://wpt.fyi/results/uievents/mouse/mousemove_prevent_default_action.tentative.html?label=master&label=experimental&aligned

Rationale

This test was added for w3c/uievents#278. There are discussions on whether calling preventDefault on mousemove should prevent selectionchange. And we all agreed that it should not. The issue didn't mention drag operation, but if the mousemove event can not be canceled, I think it makes sense that the principle should apply to drag operation (?).

However, this test also tests the sequence of mousemove and dragstart events. It expects the mousemove event fired first then dragstart event, but in Gecko, we dispatch dragstart event first then mousemove event. I don't think spec has clear definition about the timing of firing the dragstart event. Therefore, I think the ordering-check is beyond the intent of this test. WDYT?

@EdgarChen EdgarChen added the test-change-proposal Proposal to add or remove tests for an interop area label Aug 23, 2023
@nairnandu
Copy link
Contributor

@flackr could you review this proposal for Chromium?
@gsnedders / @nt1m could you review this proposal for WebKit?

@gsnedders
Copy link
Member

HTML seems to define:

This specification does not define exactly what a drag-and-drop operation actually is.

On a visual medium with a pointing device, a drag operation could be the default action of a mousedown event that is followed by a series of mousemove events, and the drop could be triggered by the mouse being released.

i.e., it leaves this explicitly undefined, therefore the test seems to be testing more than is specified.

It might be worth having an issue open on the spec to track the question of "do we want to want to define this or leave this down to individual implementations", but aside from that, avoiding asserting things the spec doesn't require is good.

@nt1m
Copy link
Member

nt1m commented Oct 12, 2023

@flackr / @mustaqahmed / @foolip Can you provide feedback from Chromium?

@mustaqahmed
Copy link
Member

The order dependency in the WPT is clearly not intended in the spec, thanks @EdgarChen for the catch. Not logging mousemove events (while keeping mousemove canceling intact) seems to be best fix here for both dragstart and selectionchange.

The test is tentative because of: w3c/uievents#278

@nt1m
Copy link
Member

nt1m commented Oct 13, 2023

@EdgarChen Can you send a PR with the test changes? Thanks everyone for weighting in!

EdgarChen added a commit to EdgarChen/web-platform-tests that referenced this issue Oct 13, 2023
nt1m pushed a commit to web-platform-tests/wpt that referenced this issue Oct 14, 2023
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Oct 26, 2023
…ve_prevent_default_action.ten…, a=testonly

Automatic update from web-platform-tests
Stop logging mousemove events in mousemove_prevent_default_action.tentative.html (#42538)

Fix web-platform-tests/interop#396.
--

wpt-commits: 4ab37a2aa733a03162ce2d5e3782d5da7940c330
wpt-pr: 42538
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this issue Oct 27, 2023
…ve_prevent_default_action.ten…, a=testonly

Automatic update from web-platform-tests
Stop logging mousemove events in mousemove_prevent_default_action.tentative.html (#42538)

Fix web-platform-tests/interop#396.
--

wpt-commits: 4ab37a2aa733a03162ce2d5e3782d5da7940c330
wpt-pr: 42538
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 30, 2023
…ve_prevent_default_action.ten…, a=testonly

Automatic update from web-platform-tests
Stop logging mousemove events in mousemove_prevent_default_action.tentative.html (#42538)

Fix web-platform-tests/interop#396.
--

wpt-commits: 4ab37a2aa733a03162ce2d5e3782d5da7940c330
wpt-pr: 42538

UltraBlame original commit: ca7528f44e8db3905bafd006cbfe3dc3d95a0625
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 30, 2023
…ve_prevent_default_action.ten…, a=testonly

Automatic update from web-platform-tests
Stop logging mousemove events in mousemove_prevent_default_action.tentative.html (#42538)

Fix web-platform-tests/interop#396.
--

wpt-commits: 4ab37a2aa733a03162ce2d5e3782d5da7940c330
wpt-pr: 42538

UltraBlame original commit: ca7528f44e8db3905bafd006cbfe3dc3d95a0625
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 30, 2023
…ve_prevent_default_action.ten…, a=testonly

Automatic update from web-platform-tests
Stop logging mousemove events in mousemove_prevent_default_action.tentative.html (#42538)

Fix web-platform-tests/interop#396.
--

wpt-commits: 4ab37a2aa733a03162ce2d5e3782d5da7940c330
wpt-pr: 42538

UltraBlame original commit: ca7528f44e8db3905bafd006cbfe3dc3d95a0625
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus area: Pointer and Mouse Events test-change-proposal Proposal to add or remove tests for an interop area
Projects
None yet
5 participants