In Android Browser link does not always execute onClick causing focus instead
Posted
by Artem
on Stack Overflow
See other posts from Stack Overflow
or by Artem
Published on 2010-02-02T17:47:24Z
Indexed on
2010/03/17
16:31 UTC
Read the original article
Hit count: 333
I am trying to program a very standard JS behavior for a link using an HREF onClick handler, and I am facing a strange problem caused by what I believe to be focus/touch mode behavior on Android.
Sometimes when I click on the link, instead of executing the action, it simply becomes selected/focused, with either just a focus rectangle or even also with a filled focus rectangle (selected as opposed to just focused?).
The pseudo-code right now is
<a href="#" onClick="toggleDivBelowToShowHide(); return false;">go</a>
I have tried doing something like:
<a href="#" onTouchStart="toggleDivBelowToShowHide(); return false;">go</a>
But I still get the same pesky problem some of the time.
© Stack Overflow or respective owner