Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Textarea does not size when it is assigned a default value #2651

Closed
tommedema opened this issue Oct 9, 2011 · 3 comments
Closed

Textarea does not size when it is assigned a default value #2651

tommedema opened this issue Oct 9, 2011 · 3 comments

Comments

@tommedema
Copy link

Platforms: Chrome, Firefox, Android browser, probably any

Issue: a textarea is supposed to size automatically, removing the need for a scrollbar. However, it does not size on startup when a default value is assigned to a textarea. It only starts sizing when you type something.

Another issue is that the textarea only increases in size: when text is removed, it does not become smaller again.

Test suite:

<textarea cols="40" rows="8" name="textmsg" id="textmsg">I am text. When you type here, the textarea will start sizing automatically as expected. However it does not do so without typing when a default value is set, like this text. I am text. When you type here, the textarea will start sizing automatically as expected. However it does not do so without typing when a default value is set, like this text.I am text. When you type here, the textarea will start sizing automatically as expected. However it does not do so without typing when a default value is set, like this text.I am text. When you type here, the textarea will start sizing automatically as expected. However it does not do so without typing when a default value is set, like this text.I am text. When you type here, the textarea will start sizing automatically as expected. However it does not do so without typing when a default value is set, like this text.I am text. When you type here, the textarea will start sizing automatically as expected. However it does not do so without typing when a default value is set, like this text.</textarea>

Demo: http://jsbin.com/amofux/5/edit#preview

@toddparker
Copy link
Contributor

Thanks, but this is a duplicate of #509

@tommedema
Copy link
Author

@toddparker, I missed that. However, note that it does not address a related issue where the textarea does not shrink in size when text is removed ("Another issue is that the textarea only increases in size: when text is removed, it does not become smaller again.").

@jaspermdegroot
Copy link
Contributor

Issue #2719 is about the textarea not shrinking.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants