rust-windowing / rust-windowing/winit
Web: make use of `PointerEvent.persistentDeviceId`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Currently PointerEvent.pointerId is used to build DeviceId, however this isn't perfect because the same device can get a new ID when it is disabled during a session. E.g. your mouse is plugged and the unplugged: it will get a new DeviceId. This is especially bad for non-connected (battery-free) pens, which get a new DeviceId every time they leave the maximum hover distance.
For this reason a new PointerEvent.persistentDeviceId was introduced, which identifies a specific device by a unique device ID throughout the whole session.
This is supported by default on Chrome since v128.
W3C
Caniuse
WPT
Firefox Standard Positions
WebKit Standard Positions
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the web input path where PointerEvent.pointerId is used to build DeviceId, then review the PointerEvent.persistentDeviceId specification and browser support linked in the issue. Done means device identity uses the persistent identifier where available and the existing behavior remains covered for unsupported browsers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100