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

md-input textarea auto grow is broken #6296

Closed

Description

Activity

  1. added
    g3: reported
    on Dec 14, 2015
  2. added this to the milestone on Dec 14, 2015
  3. mckenzielong commented on Dec 14, 2015

    @mckenzielong
    Contributor

    Looks like it is related to 7fe6f87? I am guessing the desired behaviour here was to have the textarea stay at however many rows? Or is it supposed to grow up to however many rows then shrink back down to 1?

    Keep in mind the demo itself changed to include the rows attribute too.

    I haven't had a chance to test this, but this looks like the reason it grows: var rows = Math.min(min_rows, Math.round(node.scrollHeight / lineHeight)); was changed from var rows = Math.max(min_rows, Math.round(node.scrollHeight / lineHeight)); The first call to growTextArea will set the rows attribute to 1.

    As for why it doesn't shrink, think the client height doesn't get recalculated on delete? So again it will default to min_rows.

  4. mmatheson1 commented on Dec 15, 2015

    @mmatheson1
    Author

    A ngMat team member reached out to me. Seems the behaviour has been purposely changed to grow from 1 row to rows value, rather than starting at rows value and growing indefinitely.

    He mentioned the not shrinking afterward is a known issue.

  5. modified the milestones: 1.0.1, 1.0.2 on Jan 5, 2016
  6. added
    P1: urgent
    and removed on Jan 13, 2016
  7. modified the milestones: 1.0.2, on Jan 13, 2016
  8. devversion commented on Mar 20, 2016

    @devversion
    Member

    @crisbeto already fixed that issue in #7649 and we're currently working on some textarea improvements here: #7649

  9. removed this from the - Backlog milestone on Feb 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1: urgentg3: reported

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions