Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

disable mobile browser click/touch/tap feedback box

Tags:

html

mobile

In an HTML 5 site a user, who's surfing through a mobile device, clicks a link.
The browser draws a box (rectangle) as a feedback (in addition to a sound).
Browser might mean Android 2.3's stock browser, or Opera Mobile.

Made some research about it but really, no (clear) solution.

I'd like to avoid this (blue) box. At least for iPhone and Android based devices. Any idea?

P.S I'm also using jQuery

like image 931
Poni Avatar asked Oct 19 '12 04:10

Poni


2 Answers

This is a duplicate of: Can I remove Android default link styling in webview and iPad Safari: How to disable the quick blinking effect when a link has been hit.

The answer being: add this CSS

* { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
like image 65
Brenton Fletcher Avatar answered Nov 20 '22 09:11

Brenton Fletcher


I'm +1 to an answer, provided by bloopletech. But if you'd like to have this trick worked in an android native browser (Android Browser), use next:

* { 
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -moz-tap-highlight-color: rgba(0, 0, 0, 0);
}
like image 41
Stanislav Terletskyi Avatar answered Nov 20 '22 07:11

Stanislav Terletskyi