Closed Bug 1857788 Opened 9 months ago Closed 6 months ago

Using fonts puts editor into invalid/bad state and execCommand (used for example for the smileys) fails.

Categories

(Thunderbird :: Message Compose Window, defect)

Thunderbird 115
Desktop
Windows 10
defect

Tracking

(thunderbird_esr115 affected)

RESOLVED MOVED
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):

  1. open a new html compose window
  2. click into the editor
  3. select a font, for example Calibri
  4. type "123"
  5. hit enter
  6. select a smiley from the smiley drop-down menu
  7. 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:

  1. open a new html compose window
  2. click into the editor
  3. select a font, for example Calibri
  4. type "123"
  5. hit enter
    5a. type "1"
    5b. move the cursor back before the just typed "1"
  6. select a smiley from the smiley drop-down menu
  7. observe the smiley being inserted

Not using a font will also not trigger the bug with the original STR.

Status: NEW → UNCONFIRMED
Ever confirmed: false
Keywords: regression
OS: Unspecified → Windows 10
Hardware: Unspecified → Desktop
Version: unspecified → Thunderbird 115

Fixed after bug 1852849?

(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.

Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 1852849
Whiteboard: [fixed by bug 1852849]

(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.

See Also: → 1858626

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

After more research, I learned that a back-port of bug 1840500 fixes the "missing-first-character" issue.

Depends on: 1840500
Whiteboard: [fixed by bug 1852849] → [fixed by bug 1852849 and bug 1840500]

This has been fixed in 115.6 thru the mentioned back-ports.

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → MOVED
You need to log in before you can comment on or make changes to this bug.