Open Bug 2021158 Opened 8 months ago Updated 8 months ago

Firefox incorrectly takes CSS 'overflow' into account when determining the automatic minimum size of <textarea> elements as flex items

Categories

(Core :: Layout: Form Controls, defect)

defect

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug)

User Story

user-impact-score:2

Attachments

(1 file)

STR:

  1. Load attached testcase.
    (which has a bunch of textarea elements as flex items in a narrow flex container, with a variety of CSS overflow values on the textareas)

ACTUAL RESULTS:
Firefox sizes the first three textareas as being their intrinsic width, and the last three textareas as being nearly zero-width.

EXPECTED RESULTS:
Either:
A) the textareas should all be sized the same (if we consider them to be semi-replaced elements whose scrollability is independent of the overflow property)
...or:
B) the textareas should nearly all be squished, except for the one with overflow:clip (if that makes the textarea not scrollable)

I think (A) makes the most sense for us, based on how we treat these textareas right now (they're all scrollable, completely independent of their CSS overflow value).

Safari and Chrome both give expected result (B), which makes sense for them because their textareas actually honor the specified overflow value (other than the default visible value, which just behaves as auto). It might make sense for us to match this behavior at some point if/when our textareas honor overflow, but for now (A) would probably be simplest to address this proximal issue with flex-item sizing.

Attached file testcase 1 —

Note, I'm not aware of this causing issues in the real world; I just ran across this when writing testcases for https://bugzilla.mozilla.org/show_bug.cgi?id=2020574 and testing other form controls beyond the <input> elements that are involved in that bug.

Blocks: 1912878

(In reply to Daniel Holbert [:dholbert] from comment #2)

Note, I'm not aware of this causing issues in the real world

(update: I did find one instance where this does cause issues in a real website; bug 1912878, which is now a dependency here.)

See Also: → 2021168
User Story: (updated)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: