Skip to content

Instantly share code, notes, and snippets.

@michaelwilhelmsen
Created October 3, 2019 12:25
Show Gist options
  • Save michaelwilhelmsen/5a7990916dd3904df4e602bff574b150 to your computer and use it in GitHub Desktop.
Save michaelwilhelmsen/5a7990916dd3904df4e602bff574b150 to your computer and use it in GitHub Desktop.
Mobile hover often does not register correctly. Add this one-liner to your scripts to make touches automatically trigger a hover-event.
document.addEventListener("touchstart", function() {}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment