Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

RC4: Rows attribute doesn't resize textarea when no content #5751

Closed
chr22 opened this issue Nov 16, 2015 · 5 comments
Closed

RC4: Rows attribute doesn't resize textarea when no content #5751

chr22 opened this issue Nov 16, 2015 · 5 comments
Assignees
Labels
pr: merge ready This PR is ready for a caretaker to review
Milestone

Comments

@chr22
Copy link

chr22 commented Nov 16, 2015

Textareas are always rendered with only one row if there isn't any content in it.

See this CodePen

It also limits the height of the textarea to the number of rows set.

devversion added a commit to devversion/material that referenced this issue Nov 16, 2015
100% perfect fix for textarea, check it out

Fixes angular#5751
@devversion
Copy link
Member

Yeah.

  • The limit of the textarea is the intentional behavior.

Here is again my second fix for the textarea, this one should work better.

@ThomasBurleson ThomasBurleson added this to the 1.0-rc7 milestone Dec 4, 2015
@EladBezalel EladBezalel added the pr: merge ready This PR is ready for a caretaker to review label Dec 11, 2015
@ThomasBurleson ThomasBurleson modified the milestones: 1.0-rc7, 1.0-rc8 Dec 13, 2015
devversion added a commit to devversion/material that referenced this issue Dec 30, 2015
devversion added a commit to devversion/material that referenced this issue Jan 5, 2016
@ThomasBurleson ThomasBurleson modified the milestones: 1.0-rc8, 1.1.0, Backlog Jan 5, 2016
@ndraiman
Copy link

temporary "hack":
fill your binded model with '\n' for the amount of rows you want.

html:
<textarea required name="message" ng-model="contactDetails.message" rows="5"></textarea>

js (controller):

$scope.contactDetails = {
        ....
        message: "\n\n\n\n\n" //fix for textarea remaining at 1 row.
    };

@alexilyaev
Copy link

+1, very confusing, as you'd expect rows="5" to allocate 5 empty rows.
This is essential since you sometimes want to show a big empty textarea so the user gets that they can put in a long message.

@EladBezalel
Copy link
Member

@devversion take a look

@ThomasBurleson ThomasBurleson modified the milestones: Backlog, Deprecated Apr 20, 2016
@ThomasBurleson
Copy link
Contributor

This issue is closed as part of our deprecation effort.
For details, see our post Spring Cleaning 2016.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

No branches or pull requests

6 participants