disabled textarea can not scroll in IE8 - workarou

2019-06-25 17:30发布

Under IE8, a disabled textarea won't scroll.

For example:

<textarea style="width: 85%; overflow-y: scroll;" rows="2" name="blog[comment]" id="blog_comment" disabled="disabled" cols="30">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere, erat eu ornare eleifend, sapien eros faucibus metus, nec dapibus erat ante sed lorem. Cras tempus maximus eros, ut hendrerit est. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</textarea>

It works fine in FireFox, but in IE8, the user can't scroll it, so the user can't see the full comment.

It also works with readonly, but I want to use disabled.

Is there a fix or workaround?

0条回答
登录 后发表回答