It seems like some versions of the default android Browser have a rendering issue. If I create a page where I have some sort of input field and a button, when I disable the other input field, the button appears grayed out (unless this is done on page load, you have to click around / zoom for a bit to get the browser to re-render).
The interesting thing is, it does not apply the disabled STYLE to the button, but simply grays it out. Here is a sample.
Link to editor jsfiddle
Link to embedded jsfiddle
ul { list-style-type:none; }
.xxx {
background: blue;
color: white;
}
.xxx:disabled { background-color: red; }
<div id="root">
<ul>
<li>
<input name="x" id="enable" class="x" type="radio">Enable</input>
</li>
<li>
<input name="x" id="disable" class="x" type="radio">Disable</input>
</li>
</ul>
<input type="button" class="xxx" value="Button"></input>
</div>
$(function() {
$('.x:eq(0)').prop('disabled', true);
});
Things to note:
Any ideas how to work around this?
I finally figured it out. I'm not really happy with this solution, but it seems to work.
If you wrap the inputs in a position: relative
element, it fixes 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