vin-ni / hover-on-touch

A pure Javascript Plugin for an alternative hover function that works on mobile and desktop devices. It triggers a hover css class on »Taphold« and goes to a possible link on »Tap«. It works with all html elements.
MIT License
270 stars 13 forks source link

On chrome, a long press opens the context menu. Prevent that. #6

Open acesuares opened 4 years ago

acesuares commented 4 years ago

On chrome, a long press opens the context menu. multipleTouchAmount will never === 0 after that, so the data-link is never followed. Prevent that.

acesuares commented 4 years ago

If there are no changedTouches (it happens!) then just open the link.