Take the 2-minute tour ×

Trying to create a PhoneGap app using the canvas tag on an iPad. The animations work fine and great but there is a blink whenever the canvas is tapped.

The same thing happens on my iPad when I go check sites with the canvas tag as well...

Does anyone know how I might prevent this?

share|improve this question
Could you try setting the CSS rule -webkit-tap-highlight-color to transparent on the canvas and seeing if that does the trick? –  Simon Sarris Mar 2 '12 at 21:13
add comment

2 Answers

Try having your event handler consume the event and prevent it propagating to the browser.


In my canvas app, to keep the event from all browsers, I actually use whatever's available from event.stopPropagation(), event.stopImmediatePropagation(), event.preventDefault(), and then also have the handler return false. Can't remember which platform required which, but the linked doc suggests event.preventDefault() for Safari.

share|improve this answer
add comment

This bit of CSS fixed it for me:

    * { -webkit-tap-highlight-color:rgba(0,0,0,0); }

See also -webkit-tap-highlight-color: rgba(0,0,0,0); on a div?

share|improve this answer
This works in iOS for Canvas tag. –  Mayur Birari Oct 25 '13 at 7:41
add comment

Your Answer


