Fix fixed line height of 20 in mail/components/im/content/chat-conversation.js
Categories
(Thunderbird :: Instant Messaging, defect)
Tracking
(thunderbird69 fixed, thunderbird70 fixed)
People
(Reporter: jorgk-bmo, Assigned: jorgk-bmo)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
|
1.50 KB,
patch
|
Paenglab
:
review+
florian
:
review+
jorgk-bmo
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
As per bug 1564443 comment #11.
Florian is right, the hard-coded constant doesn't work.
In the Display Options set the font size for "Other Writing Systems" to a large value and observe that the height of the chat typing area doesn't increase.
Comment 1•6 years ago
|
||
How can the height be calculated? See bug 1564443 comment #4.
Comment 2•6 years ago
|
||
Indeed, a fixed value doesn't work.
Some solutions I haven't tested but we could consider:
- Get the current font size of the conversation box and set the height accordingly.
- Get the current height of the textarea and set the conversation box height accordingly.
- Set the conversation height via CSS with
remin order to adapt to its scaled font size (would that work?).
Thoughts?
Comment 3•6 years ago
|
||
Alex, can you make sure that this gets fixed? Thanks!
| Assignee | ||
Comment 4•6 years ago
|
||
Emilio, any idea how to replace the text height calculation we removed here:
https://hg.mozilla.org/comm-central/rev/ad5905771f43#l1.12
Do any of the suggestions in comment #2 sound OK? I'm a bit confused be the nomenclature here. What's the conversation box? The messages/posts/lines which have already been sent, so above the input box?
Which "textarea" are you referring to in the second suggestion? And then "conversation box" means something else in that suggestion?
No idea what rem is. root em, hmm, never heard of it.
(Wow, Emilio has 37 pending NI's).
Comment 5•6 years ago
|
||
Calling getComputedStyle().lineHeight, and if that returns pixels, use that, otherwise if it's normal, font-size * 1.2 should be a pretty fair estimate.
| Assignee | ||
Comment 6•6 years ago
|
||
I've discussed this with Emilio on IRC.
cs["font-size"], cs.getPropertyValue("font-size"), cs.fontSize are all the same, same for line-height and .lineHeight.
I tested this with some debugging and when "normal" is returned, we calculate 20.4.
Other than that, the values can be real numbers, so I've changed the parseInt to parseFloat as suggested by Emilio.
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/57ed654fd2e0
restore line height calculation after bug 1564443 (consulting by :emilio). r=Paenglab,florian
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 11•6 years ago
|
||
TB 69 beta 2:
https://hg.mozilla.org/releases/comm-beta/rev/0274467b8c7815966ebd56bda53c2ebeafb25509
Description
•