dashersw/erste

Implement touch events fallback for desktop browsers

Open

#11 opened on Mar 19, 2017

View on GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (30 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (284 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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.

Contributor guide