Firefox doesn't display tooltips on disabled fields.
The following displays tooltip in IE/Chrome/Safari except Firefox:
<input type="text" disabled="disabled" title="tooltip text."/>
Why doesn't Firefox display tooltip on disabled fields? Is there a work around this?
By default, tooltips will not be displayed on disabled elements. However, you can enable this behavior by using the following steps: Add a disabled element like the button element into a div whose display style is set to inline-block . Set the pointer event as none for the disabled element (button) through CSS.
Step 1: Right-click on the field which produces the tooltip and choose Inspect (or press F12): Step 2: In a PageObject of type LinkType(), create a WebElement for the located tooltip icon: Step 3: In the Test Case, choose the Hover option on UI Action Test Step.
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.
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.
I guess you are using some frameworks like bootstrap. If so, it add pointer-events: none
to the 'disabled' element, so all the mouse events are ignored.
.btn[disabled] {
pointer-events: auto !important;
}
can fix the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With