Closed Bug 1539994 Opened 5 years ago Closed 5 years ago

textbox[type="number"] doesn't respect size attribute

Categories

(Thunderbird :: Preferences, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 68.0

People

(Reporter: darktrojan, Assigned: Paenglab)

References

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

This happens everywhere, so there may be a more general solution, but in the in-content stuff (which is by far the most common use), we could replicate it in CSS with something like this:

textbox[type="number"][size="1"] {
  width: 5em;
}

Sizes 1-5 are used, AFAICT.

Keywords: regression
Blocks: 1540423
Attached patch 1539994-textbox-width.patch (obsolete) — Splinter Review

Like Geoff proposed using CSS to set the width. I haven't checked every dialog but every one that uses messenger.css should be fixed. The prefs needed their own styles because they don't use messenger.css.

Assignee: nobody → richard.marti
Status: NEW → ASSIGNED
Attachment #9054715 - Flags: review?(jorgk)

Nice, but some are too narrow now:
Outgoing attachments size, only has space for one digit.
Chat idle time, too narrow.

Composition, Autosave is OK.
Display, Advanced, Reading is OK.
Show alert time is OK.

Hmm, not here. I have enough space for two digits on this two textboxes.

The chat box is from here:
https://searchfox.org/comm-central/rev/25a38b7ec4a283e19c8b05762e6b16d567ac72f0/mail/components/preferences/chat.inc.xul#39
It is too small, with and without the patch. 2 digits don't fit. If you don't believe me, I can sent a screenshot.

The cloudfile threshold is from here:
https://searchfox.org/comm-central/rev/25a38b7ec4a283e19c8b05762e6b16d567ac72f0/mail/components/preferences/applications.inc.xul#111
size=1.

The auto-save thing is here:
https://searchfox.org/comm-central/rev/25a38b7ec4a283e19c8b05762e6b16d567ac72f0/mail/components/preferences/compose.inc.xul#39
size=2

The notification duration is
https://searchfox.org/comm-central/rev/25a38b7ec4a283e19c8b05762e6b16d567ac72f0/mail/components/preferences/notifications.xul#32
size=3

We also have
https://searchfox.org/comm-central/rev/25a38b7ec4a283e19c8b05762e6b16d567ac72f0/mail/components/preferences/display.inc.xul#165
size=2

size=1 in not used a lot, in fact only once, and in Calender, it doesn't matter since the field is flexed wide.
https://searchfox.org/comm-central/search?q=size%3D%221%22&case=false&regexp=false&path=*.xul

So I suggest to change applications.inc.xul to size=2 and add size=2 to the chat. That would be appropriate for consistency anyway.

Attached patch 1539994-textbox-width.patch (JK) (obsolete) — Splinter Review

I made the changes I suggested, but the chat box didn't get any bigger :-(

#timeBeforeAway has a width set in chrome://messenger/skin/preferences/preferences.css.

Thanks, Geoff!

Attachment #9054730 - Attachment is obsolete: true
Attachment #9054746 - Flags: feedback?(richard.marti)
Comment on attachment 9054715 [details] [diff] [review]
1539994-textbox-width.patch

Let's go with my version, shall we?
Attachment #9054715 - Flags: review?(jorgk)
Comment on attachment 9054746 [details] [diff] [review]
1539994-textbox-width.patch (JK2)

Looks good, thanks.
Attachment #9054746 - Flags: feedback?(richard.marti) → feedback+
Attachment #9054715 - Attachment is obsolete: true
Attachment #9054746 - Flags: review+

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/b913cc4c3e42
Set a CSS width for textbox[type="number"]. r=jorgk

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 68.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: