I have an input type="checkbox" that is initially disabled using disabled="disabled" attribute. On iOS devices (like iPad or iPod touch), I am still able to toggle the checkbox even though its grayed out and disabled.

I tried using the disabled property as well as the disabled attribute, but still see the problem behavior with the checkbox.

<input type="checkbox" name="myCheck" disabled="disabled">

<input type="checkbox" name="myCheck" disabled>

Any thoughts on a fix for this issue on iOS devices?

有帮助吗?

解决方案

I just ran into this myself. It's not an issue of iOS, as Jonathon Stark's test page worked perfectly fine. I found it was an issue of a library I'm using: energizejs

I created an issue for it: https://github.com/davidcalhoun/energize.js/issues/15 And also created a jsfiddle to prove the issue (linked on github)

Not sure if you're using that or not, but it's likely some piece of code you have is mucking with it.

其他提示

Hm... I can't reproduce the issue. What browser/OS/device versions are you testing on?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top