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

pointerevents/pointerevent_pointerout_no_pointer_movement.html contradicts UIEvents spec and WPT #695

Closed
mustaqahmed opened this issue Sep 12, 2024 · 9 comments · Fixed by web-platform-tests/wpt-metadata#6799
Labels
test-change-proposal Proposal to add or remove tests for an interop area

Comments

@mustaqahmed
Copy link
Member

Test List

pointerevents/pointerevent_pointerout_no_pointer_movement.html

Rationale

I am proposing to remove the above test from Interop 2024: while the test matches the spec, both the test and the spec contradicts the corresponding behavior defined in UIEvents 7 years ago.

PointerEvents doesn't want pointerover/out events w/o a movement in the mouse pointer, but UIEvents wants mouseover/out events w/o a movement so that hover effect is updated correctly after a layout change or scroll.

FYI @smaug---- @flackr

@mustaqahmed mustaqahmed added the test-change-proposal Proposal to add or remove tests for an interop area label Sep 12, 2024
@masayuki-nakano
Copy link

Shouldn't be it caused by dispatching a lostpointercapture for the implicit pointer capture of the click?

@masayuki-nakano
Copy link

masayuki-nakano commented Sep 13, 2024

Err, no, opposite. pointerup -> lostpointercapture (-> mouseup) -> click -> layout change. So, no pointer boundary events should be fired. (So, it seems that the current expectation of the test matches with current spec.)

@mustaqahmed
Copy link
Member Author

Good point, I completely forgot about capturing! I presumed test_driver.click() is with pointerType == "mouse" but the documentation doesn't say anything! So it could be with "touch" and therefore subject to implicit capture. Let me file a bug for that.

@mustaqahmed
Copy link
Member Author

Err, no, opposite. pointerup -> lostpointercapture (-> mouseup) -> click -> layout change. So, no pointer boundary events should be fired. (So, it seems that the current expectation of the test matches with current spec.)

Let me explain in a different way: both the test and the spec contradicts UIEvent for the simplest case that there is a mouse and no touch or pen (so there is no implicit capturing at all). When a click adds a <div> under the non-moving mouse pointer:

I don't see how we can support both even when there is a single pointing device. In Chrome the latter is needed for a consistent hover behavior.

@gsnedders
Copy link
Member

Good point, I completely forgot about capturing! I presumed test_driver.click() is with pointerType == "mouse" but the documentation doesn't say anything! So it could be with "touch" and therefore subject to implicit capture. Let me file a bug for that.

It should match the semantics of https://w3c.github.io/webdriver/#element-click, which I think ends up with https://w3c.github.io/webdriver/#dfn-default-pointer-parameters (i.e., mouse), though @jgraham might remember these parts of the spec better than me.

@mustaqahmed
Copy link
Member Author

Thanks @gsnedders, I just re-posted your comment at web-platform-tests/wpt#48158 (I am planning to send a testdriver PR there).

@smaug----
Copy link

smaug---- commented Oct 24, 2024

Why was the test removed from interop without agreement? We should add it back, since it follows the spec.

@mustaqahmed
Copy link
Member Author

Let me explain: I wouldn't have included this test in the original 2024 proposal if I was unaware of the two conflicting WPTs mentioned above in #695 (comment). It felt odd that Interop 2024 was essentially emphasizing only the newer of the two related WPTs, and that Q3 was too late to propose adding the older. You are correct that I was too quick to removed it from Interop but the WPT is still there to support the PointerEvent spec, right?

Anyway, we can open a PointerEvent spec issue to discuss the conflict, or add it back to Interop 2024, or do both. Let me know which one you would prefer.

@mustaqahmed mustaqahmed reopened this Oct 25, 2024
@smaug----
Copy link

smaug---- commented Oct 29, 2024

I'd prefer to add the test back, since it follows the specs. Pointer events (IIRC, but I might misremember and I don't have now a link to any discussion) on purpose doesn't have the weird behavior mouse events have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-change-proposal Proposal to add or remove tests for an interop area
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants