-
-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Describe the bug
The current text area resizing needs some work. I (Chris) have actually worked on this for nearly 8 hours and still have yet to achieve something that implements all the requirements. The current implementation on staging also utilizes extra JS/CSS that is probably not necessary.
Expected behavior
- The text area defaults to a single line width when there is either no content or a single line of content
- Switching between entries should appropriately size the text area to it's content
- Resizing the window should trigger a text area resize
- Enter text that results in additional lines should grow the text area appropriately
- Deleting text that results in fewer lines should shrink the text area appropriately
The current code implements number 4 completely (auto-grow) but has significant issues with numbers 1,2,3 and 5, with the shrink effect only reducing the size by 1px for each key-up or window resize event. This has the effect of the text area slowly approaching the correct size.
Video showing partial implementation currently shipped on v1.9
https://user-images.githubusercontent.com/3444521/135624012-8c70a2bc-44da-4b0d-8630-9f6136079915.mp4