Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Links do not receive the focus when clicked on Chrome

I came across a very strange behaviour on Chrome which seems like a bug to me: when you click a link, the link does not receive the focus. Worse, the body takes the focus instead.

This behaviour can be observed here: http://jsfiddle.net/YfbR7/4/ (see code sample here)

Is this a bug? Is this standard behaviour? Is there any workaround to make the links receive the focus on mouse down, like on the other browsers?

like image 293
Gyum Fox Avatar asked Aug 23 '13 09:08

Gyum Fox


1 Answers

Add tab index to anchor tag it should work, it's not a bug its a web kit thingy.

<a href="#" tabindex="1">Click me</a>
like image 184
TheCodeDestroyer Avatar answered Oct 16 '22 09:10

TheCodeDestroyer