Andarist / Andarist/react-textarea-autosize

Placeholder text makes TextArea autosize incorrectly

未关闭
#245 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
2.4k
派生
247
PR 合并指标
30 天内没有已合并 PR

描述

The text area is not autosizing correctly. When I implement placeholder text the TextArea gets an extra line of height too tall, but when I start filling in the field it sizes correctly. I have attached images below for reference.




NotRightSize
_Placeholder text = not correct size_




RightSize
_With actual text = correct size_




NoPlaceholderRightSize
_With no placeholder and empty = correct size_

SASS for reference

`.TextArea {
width: 90%;
height: auto;
background: #EDEEFF;
font-size: 0.875rem;
padding: 1rem;
margin: 1rem;
border-radius: 1.25rem 1.25rem 0.2rem 1.25rem;
border: none;
resize: none;
text-decoration: underline;

&::placeholder {
text-decoration: underline;
font-size: 0.7rem;
}
}`

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。