w3c / webdriver

Remote control interface that enables introspection and control of user agents.
https://w3c.github.io/webdriver/
Other
679 stars 194 forks source link

Add pointerleave event for stylus #1577

Open LanWei22 opened 3 years ago

LanWei22 commented 3 years ago

Right now, the Webdriver Actions API has three action types, pointerdown, pointermove and pointerup. For stylus, if the pen is approaching the digital tablet, we should fire a pointerenter event, if the pen is leaving the digital tablet range, we will fire a pointerleave event. I am proposing to add these two events to the Actions API so we can simulate the actions in the stylus wpt tests, such as third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_pointerleave_pen-manual.html.

foolip commented 3 years ago

@jgraham do you know the right Mozilla contact for Actions API additions? This seems like a fairly small change.

Here's the test in WPT: https://github.com/web-platform-tests/wpt/blob/master/pointerevents/pointerevent_pointerleave_pen-manual.html

@LanWei22 would the tests here send pointerenter and pointerleave events directly, or do something (like describe the pen position) which the browser would turn into those events?

jgraham commented 3 years ago

I don't think we implement the pen pointer type yet. I think we'd be OK with a pointerleave event, but I don't know of any plans to prioritise implementing this.

LanWei22 commented 3 years ago

We are very happy to work on it, we will have a PR with spec change and Webdriver test soon, thank you.