Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent grey overlay on touchstart in mobile Safari/Webview

I am building an iOS app in webkit, so my whole UI is a webview. on touchStart of any element near the outer boundary of the webview (that does not have a touchStart event bound to it), I get a translucent grey box overlay the full area of the webview. I've eliminated -webkit-tap-highlight-color or -webkit-touch-callout as causes. What do I do to remove this behavior?

like image 714
Andrew Shooner Avatar asked Feb 24 '11 15:02

Andrew Shooner


1 Answers

just put this style, you still have the default actions but without the gray overlay

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

if you want to remove the actions panel, just put this

a {     -webkit-tap-highlight-color: rgba(0,0,0,0);     -webkit-touch-callout: none; } 

And there you go! clean links at last!

like image 62
Kornelius Avatar answered Sep 28 '22 09:09

Kornelius