Maintain previous type-in state (font size/face/colour) when clicking in empty paragraph or elsewhere outside a font tag



MailNews Core
8 months ago
4 months ago


(Reporter: Jorg K [Almost not working on Thunderbird (some bustage-fix only) due to non-renewal of contract], Unassigned)


Firefox Tracking Flags

(Not tracked)


Maintain previous type-in state (font size/face/colour) when clicking in empty paragraph or elsewhere outside a font tag.

This is a carry-over from bug 677046 and also captures the complaint of bug 1270803 and its duplicates.

Select some font other than "Variable Width" as predefined composition font.

Reply to an e-mail. Note that when entering text the chosen font will be used.

Reply again, this time, click somewhere in the quoted text before starting to type. This will pick up the font used at the click position. Click at the initial text insertion point (at the start of the e-mail when replying above the quote, otherwise at the end). Start typing and note that the predefined font isn't used since the click tried to pick up the font from the empty paragraph which has no font information.

First: Start typing at the initial text insertion point before clicking elsewhere in the quoted part.

Second: Don't use Paragraph mode:
Tools > Options, Composition, General. Last item.
TB 45: "When using paragraph format, the enter key creates a new paragraph"
Later versions: "Use Paragraph format instead of Body Text by default"
This may or may not mitigate the problem.

Suggestion: Use add-on ThunderHTMLedit to inspect HTML of the message to see where font information is present and where it is not.
Of course when splitting a block quote, the predefined font is also not used. Neither do we obey the paragraph setting in this case, see bug 1271835.
Duplicate of this bug: 1275260
Duplicate of this bug: 1315768
Duplicate of this bug: 1319907
Duplicate of this bug: 1270803
Some technical background: The font face/size/colour is set here for a new message, reply, forward, etc.:
using loadHTMLMsgPrefs()
These setting are applied when typing into the e-mail, however, when clicking elsewhere in the e-mail, or later into an empty paragraph, these settings are lost.

There is not easy technical solution to this. One would have to intercept the click or change of selection and then re-apply the font settings in appropriate cases, which may include clicking into an area outside a font tag, for instance an empty paragraph.

Comment 7

8 months ago
Thank you for the background information. While I do understand, that there is no easy technical solution for the current faulty scenario, I would propose to rethink how Thunderbird is handling the whole message formatting.

If a message were a simple HTML document, a simple CSS setting would apply the desired font throughout the document, no matter where somebody is clicking. Maybe we should rather strive for a solution, that makes it possible to manage styles more robust and logically?
Yes, I've thought of that. If instead of inserting a <p> we inserted a <p class="moz_tb_predef"> (or similar), then we could attach the chosen settings to that class.

Sadly, the Mozilla Core editor predates CSS somewhat, well, CSS was bolted on later. Proper CSS support is desirable, see also bug 1193631 and its duplicates.
Duplicate of this bug: 1367632
Duplicate of this bug: 1374058
Duplicate of this bug: 1381827
You need to log in before you can comment on or make changes to this bug.