5

Is there a way to turn off the highlight effects used by the mobile browser in the samsung galaxy s2 ?

I already tried:

-webkit-tap-highlight-color:rgba(0,0,0,0)
-webkit-tap-highlight-color:transparent
-webkit-touch-callout: none;
outline:none;

-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;

alternatively - can someone explain exactly When those effects show? can I detect a screen touchstart and touchend in a way that does not trigger those effects?

Thanks

epeleg
  • 10,347
  • 17
  • 101
  • 151
  • I not shure if this will solve your problem but did you try `a:focus { outline: none }`? – doptrois Jun 03 '12 at 22:20
  • Do you expect the :focus selector to affect any html tag? or does it work only on "A" tags? basicly my issue is not with a tags but with divs. – epeleg Jun 04 '12 at 06:26

3 Answers3

5

CSS:

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

HTML:

<div class="borderImage">
    <a href="#">Some text</a>
</div>

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

Edit (nice to know):

/* No background, just iOS:*/
-webkit-tap-highlight-color: transparent;

/* No background iOS + Android:  */
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
Community
  • 1
  • 1
doptrois
  • 1,560
  • 11
  • 10
  • turns out the problem was that my CSS selector didn't actually hit the desired html elements... – epeleg Jul 16 '12 at 14:09
0

Try using e.preventDefault(); on the touch start event.

Asherah
  • 18,948
  • 5
  • 53
  • 72
bazi
  • 1
  • I noticed that your response was originally "We had the same problem ...". I am not sure why was this edited out... this is definatly not a me too but a strong indication that you actually resolved the issue - am I right about that ? – epeleg Jun 07 '12 at 13:37
0

use this

* {
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

}
Osvaldo Cipriano
  • 313
  • 1
  • 2
  • 11