Disabling iPhone keyboard for textarea in web application
So I have multiple textareas on my page that are editable depending on a users status. The problem is that even when a user 开发者_JAVA技巧clicks on a textarea that they are not allowed to edit, the keyboard comes up on mobile safari. The user can't actually edit the textarea, but it's really annoying/looks bad. I was thinking of maybe making it disabled but without actually changing it's look. Any suggestions?
Are you using TextView or TextField? For a TextView you can set Editable to NO to prevent the keyboard being popped up.
For TextField I guess you can set userInteractionEnabled to NO. Haven't tried this before though.
Have you tried disabling the input/textarea field? I think if you click on that the keyboard says closed.
<index disabled />
or
<textarea disabled />
精彩评论