You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
P1: urgentUrgent issues that should be addressed in the next minor or patch release.g3: reportedThe issue was reported by an internal or external product team.
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.
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.
P1: urgentUrgent issues that should be addressed in the next minor or patch release.g3: reportedThe issue was reported by an internal or external product team.
Activity
mckenzielong commentedon Dec 14, 2015
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 fromvar 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.mmatheson1 commentedon Dec 15, 2015
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.
devversion commentedon Mar 20, 2016
@crisbeto already fixed that issue in #7649 and we're currently working on some textarea improvements here: #7649