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

Only trigger touch specific code on touch events #51

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

Conversation

fcheung
Copy link

@fcheung fcheung commented Aug 3, 2023

In handlePointerEnter, handlePointerLeave this is a separate code path for touch devices, gated by isTouchDevice().

However, just because a device supports touch inputs doesn't mean they are actually being used. For example some laptops have touch screens in addition to trackpad, external mice etc. Therefore we should check to see whether the specific event we are handling is a touch event

In handlePointerEnter, handlePointerLeave this is a separate code path
for touch devices, gated by isTouchDevice().

However, just because a device supports touch inputs doesn't mean they are
actually being used. For example some laptops have touch screens in
addition to trackpad, external mice etc. Therefore we should check to see
whether the specific event we are handling is a touch event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant