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

Pointer and mouse events #202

Closed
flackr opened this issue Oct 12, 2022 · 20 comments
Closed

Pointer and mouse events #202

flackr opened this issue Oct 12, 2022 · 20 comments
Labels
accepted An accepted proposal focus-area-proposal Focus Area Proposal

Comments

@flackr
Copy link

flackr commented Oct 12, 2022

Description

This focus area covers the behavior of pointer and mouse interaction with pages, including how they interact with hit testing and scrolling areas. We have decided to explicitly exclude touch and stylus due to lack of WPT testing support across all browsers.

Rationale

Based on the proposed pointer events 2022 focus area we determined that there is a significant interop challenge amongst existing stable input APIs that developers actively struggle with today. Our 2022 investigation produced a list of issues where you can see examples from various sites and frameworks as well as many different browser behaviors on specs that have been well established for years.

Specification

https://w3c.github.io/pointerevents/
https://w3c.github.io/uievents/

Tests

A tentative list of targeted tests is in progress at Interop 2022: Pointer Events Related Issues. Each row represents a particular issue which is actively being triaged and turned into a test if in scope.

@tbondwilkinson
Copy link

Pointer and mouse events are a P4 for Google's closure library

"This would impact goog.events."

@jensimmons
Copy link
Contributor

It looks like from the list of 81 items on the list of issues, only 4 currently have both a spec that's "ok" and tests.

Does this mean the Interop 2023 proposal is to include these 4 items?

Narrowing the larger 2022 investigation into a specific request for 2023 seems needed before organizations can assess their position. Clarity about the scope of this proposal would be welcome. Just a reminder, the deadline for clarifications is Monday Oct 31.

@flackr
Copy link
Author

flackr commented Oct 31, 2022

It looks like from the list of 81 items on the list of issues, only 4 currently have both a spec that's "ok" and tests.

It's not expected that we will have a test for every row. We've been triaging each row to determine whether it is currently testable and well specified cross browser. So it would be more accurate to say 32 of the 81 items have been triaged to either should be tested or not.

Does this mean the Interop 2023 proposal is to include these 4 items?

The proposal was to have the majority of the spreadsheet triaged with tests written where possible and behavior is specified. It has turned out many issues raised are untestable due to lack of cross browser support for testing touch (and a few other missing testdriver APIs).

Clarity about the scope of this proposal would be welcome.

To help bring some clarity @mustaqahmed has done a pass through the list and added some test links as well as defined for other rows a specific proposed test so we currently have 8 test units (664 subtests), have expectations defined for 8 more tests (see “Proposed test” column). If we ballpark the same rate of testable issues from the remaining 49 rows, we'd expect to see a total of about 40 test units.

the deadline for clarifications is Monday Oct 31.

For clarity today, we can say there are 16 proposed test units - however we expect there to be many more testable input interop issues from the remaining items.

@jensimmons
Copy link
Contributor

Could you list here what those 16 tests are?

@mustaqahmed
Copy link
Member

Here are the 16 tests we identified:

  • Existing:

    • /dom/events/Event-dispatch-click.html
    • /html/semantics/disabled-elements/disabled-event-dispatch.tentative.html
    • /pointerevents/pointerevent_hit_test_scroll_visible_descendant.html
    • /pointerevents/pointerevent_disabled_form_control.html?mouse
    • /pointerevents/pointerevent_movementxy.html?mouse
    • /html/user-activation/activation-trigger-pointerevent.html?mouse
    • /uievents/mouse/cancel-mousedown-in-subframe.html
    • /pointerevents/pointerevent_attributes_hoverable_pointers.html?mouse
  • Proposed:

    • Test that removing an event target doesn't fire an extra pointerenter at parent element
    • Test that clicking summary in disabled fieldset still opens details
    • Test click firing on non-form fields inside a disabled fieldset
    • Test no pointerout dispatch when target under cursor changes w/o any pointer movement
    • Test pointerup firing after pointerdown handler removes its event-target
    • Test that canceling a mousemove doesn't suppress text selection
    • Update pointerevent_attributes_hoverable_pointers.html to include pressure condition
    • Test pointerleave after touch on a disbaled button

@mustaqahmed
Copy link
Member

FYI for @dcrousso, @EdgarChen, @graouts, @howard-e, @smaug----, @whsieh and @zcorpan, in case we have more to add from your sides.

@smaug----
Copy link

  • Test pointerleave after touch on a disbaled button

is a bit surprising. Why this one part would be focusing on touch?

One thing pointed by @EdgarChen is that pointerevent_supports.js, which is used by many tests, seems to test also non-standard properties, like toElement/fromElement, so either those would need to be spec'ed or removed from the test. Either is probably fine. But anyhow, that is a reminder for us to write test which follow the specs :)

@saschanaz
Copy link
Member

  • Test pointerleave after touch on a disbaled button

is a bit surprising. Why this one part would be focusing on touch?

Maybe a typo of pointercancel?

@smaug----
Copy link

I meant mostly about the "touch" part.

@foolip
Copy link
Member

foolip commented Nov 11, 2022

In the MDN short survey on APIs & JavaScript, "Pointer Events" was selected by ~16% of survey takers, putting it in the middle third of options. (There is some uncertainty as with any survey data.)

@saschanaz
Copy link
Member

saschanaz commented Nov 15, 2022

We just got a few more pointer event related tests in /html/semantics/disabled-elements/, and more planned in web-platform-tests/wpt#32381.

@mustaqahmed
Copy link
Member

A quick update: so far we have got 16 landed tests (which contain 1630 subtests in total). We are expecting to add ~6 more tests by the end of next week.

@mustaqahmed
Copy link
Member

Here are the 22 tests for our 2023 Interop focus, which contains 1095 subtests.

This list comes from our shared work logged in the spreadsheet in @flackr's original post above (in particular, from the Triaged and not excluded filter view). Please correct me if I missed something.

@gsnedders
Copy link
Member

Here are the 22 tests for our 2023 Interop focus, which contains 1095 subtests.

We're likely still in favour of omitting any touch tests, given Safari on macOS doesn't support touch and w3c/webdriver#1665 means that it's undefined what WebDriver should do in that situation. (Not making any comment on the rest of these, to be clear.)

@smaug----
Copy link

The initial comment says "We have decided to explicitly exclude touch and stylus due to lack of WPT testing support across all browsers." so I don't expect any touch or pen event handling be covered here.

@mustaqahmed
Copy link
Member

Updated the link and the sheet to remove/exclude all touch related tests.

We now have these WPTs: 17 tests (1078 subtests)

If you want to add any new/existing test, please update this thread and I will update the WPT link. Alternatively, you can simply mark Columns A, C, F and R in our spreadsheet and the link in Cell F2 will auto-update.

@mustaqahmed
Copy link
Member

Today I heard a question on the changing number of subtests, so wanted to clarify: the number of subtests in pointerevents/ folder has gone down quite a bit in first few days of this month because some highly repetitive attribute checks has been refactored to use fewer test()s. There was no loss of coverage; in fact we now have more assertions than before.

@foolip
Copy link
Member

foolip commented Jan 17, 2023

@mustaqahmed one of the 17 tests (/dom/events/Event-dispatch-click.html) was already part of Interop 2022. Was it intentional to list it in your list, or was is listed incorrectly instead of some other test? Just want to make sure we don't miss any tests. The 16 other have now been labeled "interop-2023-events".

@mustaqahmed
Copy link
Member

Thanks for the catch, looks like we didn't check coverage overlap with 2022!

@foolip: do you have a dashboard query for the label "interop-2023-events"? Otherwise we can use this link from the (now-updated) spreadsheet: 16 tests (1066 subtests)

@foolip foolip added the accepted An accepted proposal label Feb 1, 2023
@foolip
Copy link
Member

foolip commented Feb 1, 2023

Thank you for proposing pointer and mouse events for inclusion in Interop 2023.

We are pleased to let you know that this proposal was accepted as the Pointer and Mouse Events focus area. You can follow the progress of this Focus Area on the Interop 2023 dashboard.

For an overview of our process, see the proposal selection summary. Thank you for contributing to Interop 2023!

Posted on behalf of the Interop team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted An accepted proposal focus-area-proposal Focus Area Proposal
Projects
No open projects
Status: Proposed
Development

No branches or pull requests

8 participants