Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

range input disable does not work in chrome

I am disabling my range input however in chrome it shows it grayed out but it is still usable.

<input type="range" disabled min="0" max="100"/>

I would assume the above would not allow you to change its value.

Am I doing it wrong?

jsFiddle

Relevant specification Disabled

like image 805
Andrew Avatar asked Oct 23 '22 23:10

Andrew


2 Answers

Here is the Chrome bug report, guess just need to wait for version 15 as the commenters mentioned.

Bug 54820

like image 142
Andrew Avatar answered Nov 01 '22 00:11

Andrew


you can remove all binded events of that specific scroll group to make that scroll disable like:

<div id="fieldset1">
<input type="range" disabled min="0" max="100" readonly="1"/>
</div>

<script>
 $(":range").rangeinput();
 $('#fieldset1 *').unbind(); // for all events
</script>

its works .. no need to disable text field; beacause on form submission that field will not be posted ..

like image 20
Shadman Avatar answered Nov 01 '22 00:11

Shadman