Open LanWei22 opened 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?
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.
We are very happy to work on it, we will have a PR with spec change and Webdriver test soon, thank you.
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.