Andarist / Andarist/react-textarea-autosize

Placeholder text makes TextArea autosize incorrectly

Abierto
#245 9 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
2.4k
Forks
247
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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;
}
}`

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.