0

I'm working on an app and have a resizable textarea. I noticed that it can be shrunk vertically such that it isn't really tall enough to fit text, as seen below. Should text boxes generally have a minimum height of the line height to prevent this?

enter image description here

9
  • The text is part of the scrollable content and so it is not at the same level as the container. On a larger scale, it is similar to a browser window and the content within. It can be easily defined manually within textarea css textarea {line-height:1.5em; min-height:1.5em;} Commented Jul 23 at 5:57
  • Personally I prefer textarea to have a larger min-height, about 3 lines of text. A textarea should look like a box for multiple lines of text. Commented Jul 23 at 7:02
  • @Ren: OP is asking about the minimum resizable size, not the initial size. It the user wants to shrink the text area such that it can only hold one line of text, that's on them. Commented Jul 24 at 14:56
  • @Adam, have you checked whether this behavior of your particular textarea is defined in code? I'm asking because some browsers make textareas resizable even if they have been defined with fixed size. In that latter case, it might even be something you literally cannot prevent from happening. Also, along the same lines as Brian's earlier comment: the worst that can happen is that the user makes the textarea tiny and then has to resize it again. IMHO, that's not enough of a problem to warrant spending much time and effort on. 🤷‍♂️ Commented Jul 24 at 21:08
  • (cont'd) That said, I find that it increases usability to have a meaningful default textarea size: if you expect a user to type lengthier text into an area, make it larger than just a single line, so the user is not forced to resize it just to see the full context of their input. Commented Jul 24 at 21:10

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.