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

Implement pointer handling #239

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jarstelfox
Copy link

When using Edge on Windows 10 with a precision touchpad (PTP), Edge
does not generate scroll events. This means that zooming does not work
on PTP devices. It seems that Touch events are also not
generated. This commit implements support for the upcoming/new Pointer
API, which is supported across most modern browsers. The Pointer API
provides a unified API for pointing devices, including both mice and
touchpads.

After this commit, the Pointer API will be preferred to both the Touch
and the mouse APIs if it is present.

We do preventDefault on the events in order to prevent clicks from
being generated by them in addition to the pointer events, since
they've been handled.

When using Edge on Windows 10 with a precision touchpad (PTP), Edge
does not generate scroll events. This means that zooming does not work
on PTP devices. It seems that Touch events are also not
generated. This commit implements support for the upcoming/new Pointer
API, which is supported across most modern browsers. The Pointer API
provides a unified API for pointing devices, including both mice and
touchpads.

After this commit, the Pointer API will be preferred to both the Touch
and the mouse APIs if it is present.

We do `preventDefault` on the events in order to prevent clicks from
being generated by them in addition to the pointer events, since
they've been handled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant