在Chrome上点击链接时,链接不会受到关注 [英] Links do not receive the focus when clicked on Chrome

查看:180
本文介绍了在Chrome上点击链接时,链接不会受到关注的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Chrome上遇到了一个非常奇怪的行为,这对我来说似乎是一个错误:当你点击一个链接时,这个链接没有收到焦点。更糟的是,身体取而代之。



这种行为可以在这里观察到: http://jsfiddle.net/YfbR7/4/ 看到代码示例在这里



这是一个错误?这是标准的行为?是否有任何解决方法,使链接接收鼠标关注焦点,就像在其他浏览器?

解决方案

添加选项卡索引锚标签它应该工作,这不是一个错误,它的网络套件thingy。

 < a href =#tabindex = 1>点击我< / a> 


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?

解决方案

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>

这篇关于在Chrome上点击链接时,链接不会受到关注的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆