Firefox 不会在禁用的输入字段上显示工具提示 [英] Firefox does not show tooltips on disabled input fields
问题描述
Firefox 不会在禁用字段上显示工具提示.
Firefox doesn't display tooltips on disabled fields.
以下在 IE/Chrome/Safari 中(Firefox 除外)显示工具提示:
The following displays tooltip in IE/Chrome/Safari except Firefox:
<input type="text" disabled="disabled" title="tooltip text."/>
为什么 Firefox 不在禁用字段上显示工具提示?有没有办法解决这个问题?
Why doesn't Firefox display tooltip on disabled fields? Is there a work around this?
推荐答案
似乎是一个(非常古老且非常废弃的)错误.参见 Mozilla 错误 #274626 #436770
Seems to be a (very old, and very abandoned) bug. See Mozilla Bugs #274626 #436770
我想这也可以解释为预期行为.
I guess this could also be explained as intended behaviour.
想到的一个可怕的解决方法是使用 z-index
将按钮与具有 title
属性的不可见 div 重叠;另一个以某种方式重新激活按钮onmouseover",但巧妙地拦截和删除该按钮上的任何 click
事件.
One horrible Workaround that comes to mind is to overlap the button with an invisible div with a title
attribute using z-index
; another to somehow re-activate the button 'onmouseover' but to cleverly intercept and trash any click
event on that button.
这篇关于Firefox 不会在禁用的输入字段上显示工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!