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

[Desktop] swipe event fires on incorrectly desktop and non-touch devices #99

Open
wparad opened this issue Jun 30, 2023 · 6 comments
Open

Comments

@wparad
Copy link

wparad commented Jun 30, 2023

Swipe events should never fire on devices that aren't touch screens.

@jerrybendy
Copy link
Owner

Yes you are right, and this is the desired result.

@wparad
Copy link
Author

wparad commented Jun 30, 2023

Can you explain why that makes sense, so we can have a better understanding of the intention?

The expectation for our users is that on mobile, a swipe touch event is necessary, but on desktop this breaks the whole experience. When a user on desktop attempts to copy text from the screen, the swipe activates, which is a huge problem.

@jerrybendy
Copy link
Owner

I got your problem. How about add a new option to disable swipe on desktop? Or anything better?

@wparad
Copy link
Author

wparad commented Jun 30, 2023

Works for me, I'd honestly make it the default. There's something confusing about drag versus swipe. But I haven't really dug into all the details.

Would this have to be a new v- type or a some property added to the end of swipe... v-touch.swipe-mobile.left=...?

@jerrybendy
Copy link
Owner

I prefer to make things common, so I think swipe-mobile is not a good choice. Maybe disableSwipeOnDesktop? I have no idea. Could you give me more advice?

@wparad
Copy link
Author

wparad commented Jun 30, 2023

My advice would be for this not to be an option at all. In reality the swipe action should only trigger on devices that have touch. If the device does not have touch swipe doesn't make sense. click, drag, etc.. all still make sense, but swipe not. Is there some way you can dynamically figure out if the device is a touch device and only run the event on there?

@wparad wparad changed the title [Desktop] swipe event fires on desktop not just mobile [Desktop] swipe event fires on incorrectly desktop and non-touch devices Jun 30, 2023
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

No branches or pull requests

2 participants