Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Textarea extra row in FireFox browser

In FireFox HTML <textarea>s have one more row than specified in the property rows. If you are on FireFox you can see here:

<textarea rows="2">
This clearly has 3 rows and not 2 like you might think.
</textarea>

If you are not using FireFox right now then this is what the snippet result looks like to me:

enter image description here

like image 487
James Douglas Avatar asked Mar 08 '23 20:03

James Douglas


1 Answers

Yes, it's an age-old bug in Firefox that still hasn't been fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=33654.

There is a workaround:

textarea {
  overflow-x: hidden
}

I don't know if this workaround could cause any issue - is it ever possible for a textarea to overflow horizontally?

like image 178
Jake Avatar answered Mar 10 '23 10:03

Jake