Open Bug 1497999 Opened 7 years ago Updated 3 years ago

Disallow setting 'text-transform' on a file input.

Categories

(Core :: Layout: Form Controls, enhancement, P4)

enhancement

Tracking

()

Tracking Status
firefox64 --- affected

People

(Reporter: MatsPalmgren_bugz, Unassigned)

Details

(Keywords: site-compat, testcase)

We should probably not allow 'text-transform' on a file input, because it could be confusing to the user. Chrome doesn't allow it, fwiw. Testcase: data:text/html,<input type=file style="text-transform:uppercase"> ACTUAL RESULT Both the "Browse..." button text and the filename is in UPPERCASE. EXPECTED RESULT 'text-transform' has no effect at all on this control (I haven't checked what Safari/Edge does)
It should at least not affect the filename... but perhaps the button text is OK.
There's also a difference in how we handle 'letter-spacing'. Chrome applies it to the filename, but not the button text. Firefox applies it to the button text, but not the filename. In this case, I think I prefer Firefox. (ditto 'word-spacing')
data:text/html,<input type=file style="text-align:right !important; width:500px"> is also incompatible. Chrome seems to ignore 'text-align', we don't.
Keywords: site-compat
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.