I'm writing a web app that uses an HTML5 canvas and testing on a Nexus Galaxy. When the user taps on the canvas, it highlights teal for a second, even though I am calling preventDefault() on the touchstart event. I have also tried some CSS rules. How do I disable this brief highlighting?
Asked
Active
Viewed 1,288 times
1 Answers
2
Setting the CSS rule -webkit-tap-highlight-color
to transparent
on the canvas seemed to do the trick for me.
Note that I also did preventDefault and stopPropagation, so one of those might have had an effect too.

Simon Sarris
- 62,212
- 13
- 141
- 171
-
Thanks! I thought I had tried this but apparently I had a typo or something. It's working now.... – lacker Feb 17 '12 at 02:00