3

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?

Kara
  • 6,115
  • 16
  • 50
  • 57
lacker
  • 5,470
  • 6
  • 36
  • 38

1 Answers1

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