Andarist / Andarist/react-textarea-autosize

Placeholder text makes TextArea autosize incorrectly

オープン
#245 コメント 9 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。