erste
erste copied to clipboard
Implement touch events fallback for desktop browsers
Desktop browsers don't trigger touchstart, touchmove and touchend events. Instead, they have mousedown, mousemove and mouseup. Although browsers such as Chrome now come with "mobile device simulation", it could be more preferable to just support desktop browsers natively.
In order to achieve this, we should detect if the current browser is a desktop browser and if so, listen to mouse events instead of touch events.