Spin button appearance makes text entry unreadable, <input type="number"> covered by wide buttons
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox84 | --- | wontfix |
firefox85 | --- | wontfix |
firefox86 | --- | fixed |
People
(Reporter: gcp, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(7 files)
Reporter | ||
Comment 1•4 years ago
|
||
This is an example of a webcompat problem from non-native theming: the new theme makes the text unreadable.
The site is runalyze.com, though there's probably no simple STR to get this particular dialog without an account with data etc.
Assignee | ||
Comment 2•4 years ago
|
||
data:text/html,<input type="number" style="width: 4em" value="1234">
might be a reasonable enough test-case.
Reporter | ||
Comment 3•4 years ago
|
||
The original HTML looks roughly like:
<td class="zone-cell-from"><span class="input-with-unit"> <input type="number" id="sport_zones_settings_5_from" name="sport_zones[settings][5][from]" class="small-size" value="354" readonly=""> <label for="sport_zones_settings_5_from" class="input-unit">W</label></span></td>
Comment 4•4 years ago
|
||
Emilio, do you have a recommended way of addressing this? Should we widen the control by the extra space required by the spinner buttons? I also couldn't quite figure out how to recreate a control with the "W" on the right of the spinner buttons, although I'm not sure that it will be relevant here.
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
You can't really do that if the author specifies the width of the control. I think for cases like comment 2 we need to shrink the buttons, at least conditionally. Gian-Carlo, can you inspect the number input and see if they're explicitly specifying width
/ max-width
?
Comment hidden (obsolete) |
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 8•4 years ago
|
||
Yeah, so they're hardcoding width: 44px
, so it's basically comment 2, and we can't really grow the input.
Comment 9•4 years ago
|
||
I believe that due to the changes to the sizes of many of our form controls we are bound to run into these kinds of compatibility issues. Is there a good rule of thumb that we can follow to determine when we need revert to the old sizing, and when to simply live with the breakage and expect web authors to address it on their end? As unfortunate as this is, it seems to me that as soon as we were willing to change the sizing of our default form controls, we implicitly agreed to live with some level of breakage.
Assignee | ||
Comment 10•4 years ago
|
||
I guess we can track these off a metabug or something, and see how often we find these. We should also judge the severity of the issue, for example this one seems somewhat serious because it can prevent the text in the input from being readable...
Updated•4 years ago
|
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Tracking non-native theming bugs for Fission Beta milestone (M7).
Comment 12•4 years ago
•
|
||
I would suggest picking a smaller width for the buttons and sticking with it, for consistency. I would take this bug as evidence that the larger width is not web compatible.
Updated•4 years ago
|
Comment 13•4 years ago
|
||
Here's another instance of this problem: https://www.gutekueche.at/spekulatius-rezept-24305
Assignee | ||
Comment 15•4 years ago
|
||
Assignee | ||
Comment 16•4 years ago
|
||
Use the same width as the select arrow button makes sense to me and
fixes all the reported problems so far.
Also tweak the sizing / painting to take less height since these have a
background, so stuff like:
<input type=number style="height: 100px">
Looks super ugly otherwise.
The new polygon coordinates are the result of scaling by 1.5 and
centering vertically the arrow, which gives the same visual effect for
the regular input without margin / padding, but prevents the issue
described above with too-tall inputs or inputs with lots of padding.
We might want to shrink them a bit more if needed, but I think this is
alright. For reference, Chrome uses 15px, but we remove the inline-end
padding by default so we compensate a bit that way.
If we don't like how this looks when the author specifies padding on the
input (see comment 13 for example), we might want to reconsider the
design so that the spinners look good with padding, but that's a
different task completely.
Comment 17•4 years ago
|
||
Comment 18•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Updated•4 years ago
|
Description
•