Update PointerEvent to have default width / height set to 1
What:
This PR updates PointerEvent to have default width / height set to 1 as per the spec.
- https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width
- https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height
Why:
new PointerEvent('xxx') on most browser implementations should set them 1 by default.
Also some libraries check if a pointer event is virtual or not by looking at the geometry values, while we expect this library to work exactly as the actual interactions.
- ex: Floating UI
How:
Just use 1 as default values on them.
Checklist:
- [x] Documentation
- Not needed?
- [x] Tests
- [x] Ready to be merged
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Any chance this PR could be merged? This affects pointer event handling by React Aria, which checks width / height to determine if events are coming from virtual clicks (e.g. screen readers).
:tada: This PR is included in version 14.6.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thank you for the release!