Using fonts puts editor into invalid/bad state and execCommand (used for example for the smileys) fails.
Categories
(Thunderbird :: Message Compose Window, defect)
Tracking
(thunderbird_esr115 affected)
Tracking | Status | |
---|---|---|
thunderbird_esr115 | --- | affected |
People
(Reporter: TbSync, Unassigned)
References
Details
(Keywords: regression, Whiteboard: [fixed by bug 1852849 and bug 1840500])
STR (observed on Windows 10, Thunderbird 115.3.1):
- open a new html compose window
- click into the editor
- select a font, for example Calibri
- type "123"
- hit enter
- select a smiley from the smiley drop-down menu
- observe the smiley NOT being inserted
From what I can see, execCommand used here fails if the following 2 elements are coming together (as in this STR)
- using font tag
- having the current cursor position before a <br>
Redo the STR but after step 5, check the source code of the editor using the html source editor add-on: https://addons.thunderbird.net/addon/html-source-editor/
You will see something like this:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>
<font face="Calibri">123</font>
</p>
<p>
<font face="Calibri"><br></font>
</p>
</body>
</html>
The current cursor position before inserting the smiley is inside the font tag before the <br> tag. The newline is due to the entire <p> tag. The <br> tag is actually hidden.
After you have tried to insert the smiley, the cursor will have moved up one line and will be behind "123". The source code will look like so:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>
<font face="Calibri">123</font>
</p>
</body>
</html>
The second <p> tag is removed.
The following extra steps prevent the bug:
- open a new html compose window
- click into the editor
- select a font, for example Calibri
- type "123"
- hit enter
5a. type "1"
5b. move the cursor back before the just typed "1" - select a smiley from the smiley drop-down menu
- observe the smiley being inserted
Not using a font will also not trigger the bug with the original STR.
Reporter | ||
Updated•9 months ago
|
Reporter | ||
Updated•9 months ago
|
Fixed after bug 1852849?
Reporter | ||
Comment 2•9 months ago
|
||
(In reply to Francesco from comment #1)
Fixed after bug 1852849?
It seems to be fixed when I build Thunderbird with most recent m-c. But I would like to delay closing this bug as a dupe until I could confirm it being fixed in Thunderbird ESR 115 (after backporting), if that is possible.
(In reply to John Bieling (:TbSync) from comment #2)
it being fixed in Thunderbird ESR 115 (after backporting), if that is possible.
Should be possible. I guess that it's cleanly graft-able.
Reporter | ||
Comment 4•7 months ago
|
||
This is not fixed in Thunderbird 115.5 ESR.
Another very simple STR is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1852849#c12
Reporter | ||
Comment 5•7 months ago
•
|
||
After more research, I learned that a back-port of bug 1840500 fixes the "missing-first-character" issue.
Reporter | ||
Updated•7 months ago
|
Reporter | ||
Comment 6•6 months ago
|
||
This has been fixed in 115.6 thru the mentioned back-ports.
Description
•