Open ggetz opened 7 years ago
We discussed this when I added touch instructions to the navigation help widget. Unfortunately, there's no standard way to determine whether the browser is on a mobile device. We can't just rely on whether the browser has touch events because there are computers with touch screens that have both touch and mouse controls, in which case I think we would want to show the mouse instructions by default.
It might be worth checking for the most common mobile devices (checking for mobile safari/mobile chrome/mobile firefox will account for the majority of users), but there's no way to guarantee you'll get 100% of mobile devices.
non-100% would be OK.
It may be overkill to include a third-party until we need this check more widely, but I believe a lot of people use this: https://hgoebl.github.io/mobile-detect.js/
The navigation help panel 'Touch' tab should be active initially if the browser detects user is using a mobile device.