SSENSE / vue-carousel

A flexible, responsive, touch-friendly carousel for Vue.js
https://ssense.github.io/vue-carousel/
MIT License
1.72k stars 504 forks source link

fix detection of being touch device #550

Open mxzinke opened 3 years ago

mxzinke commented 3 years ago

The detection with checking if a specific handler is available in the window is not always working. This causes issues, that the carousel is working with the knowledge of having a non-touch device and does attach the wrong handlers.

Description

Motivation and Context

I don't know if there is already an issue for that, but it does exist the issue, that the carousel does not side on some Electron Apps using vue-carousel.

How Has This Been Tested?

With an Electron App, where it was not working before. No additional testing required, because it's a known default for checking if it's a touch device.

https://www.geeksforgeeks.org/how-to-detect-touch-screen-device-using-javascript/

Types of changes