Created
September 12, 2018 16:38
-
-
Save icyJoseph/d7ec16f12e79337f8a38d480dcb8722f to your computer and use it in GitHub Desktop.
Make the body in iOS touch screens clickable again
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const bodyClickFix = cb => { | |
if ("ontouchstart" in document.documentElement) { | |
const highlight = "-webkit-tap-highlight-color"; | |
document.body.style.cursor = "pointer"; | |
document.body.style[highlight] = "transparent"; | |
} | |
return cb(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment