vue-touch-events icon indicating copy to clipboard operation
vue-touch-events copied to clipboard

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

Open wparad opened this issue 1 year ago • 6 comments

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

wparad avatar Jun 30 '23 06:06 wparad

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

jerrybendy avatar Jun 30 '23 07:06 jerrybendy

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.

wparad avatar Jun 30 '23 07:06 wparad

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

jerrybendy avatar Jun 30 '23 07:06 jerrybendy

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=...?

wparad avatar Jun 30 '23 07:06 wparad

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?

jerrybendy avatar Jun 30 '23 08:06 jerrybendy

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 avatar Jun 30 '23 08:06 wparad