Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textarea height does not increase when placeholder text wraps to next line #742

Open
Pradeep17Jadhav opened this issue Apr 24, 2024 · 0 comments

Comments

@Pradeep17Jadhav
Copy link

Steps to reproduce:

  1. Give some fixed width to the container of the textarea. E.g. 50px.
  2. Set a long placeholder
  3. Try adding and removing the text in textarea

Expected behaviour:
When the placeholder of textarea is long and wraps to next line, the height of the textarea should increase accordingly so that the placeholder is always visible.

Observed behaviour:
When the entered text wraps to next line, the height of the textarea increases automatically. But if the placeholder of textarea wraps to next line, it does not increase the height of the textarea, and the text overflows.

Workaround:
::before can be set to inputbox__highlighter class with the same content as the placeholder.

Suggestion:
Provide a boolean prop to enable or disable the height increase as per the placeholder text.

image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant