Open Bug 1718563 Opened 3 years ago Updated 2 years ago

Font regions in preformat do not close properly on selecting Fixed Width

Categories

(Thunderbird :: Message Compose Window, defect)

Thunderbird 91
defect

Tracking

(Not tracked)

People

(Reporter: henry-x, Unassigned)

Details

Steps to reproduce

  1. Open a new HTML message composition.
  2. Select "Preformat" state. (The UI shows the font as "Fixed Width").
  3. Type some text.
  4. Select "Helvetica, Arial" font.
  5. Type some text.
  6. Select "Fixed Width" font again.
  7. Type some text.

Result

The message body is

<pre>
  normal
  <font face="Helvetica, Arial, sans-serif">
    with font
    <font face="monospace">
      back to fixed
    </font>
  </font>
  <br>
</pre>

Expect

Whilst the message will look the same, I would expect the <font face="monospace"> to not be present:

<pre>
  normal
  <font face="Helvetica, Arial, sans-serif">
    with font
  </font>
  back to fixed
  <br>
</pre>

The "Preformat" block already implies "Fixed Width" font. So in step 3 above, the user is shown "Fixed Width", so it would be reasonable to assume that they should select "Fixed Width" to end the "Helvetica, Arial" font cleanly.

To actually achieve the desired result, the user would have to select "Variable Width" in step 6 instead (although the UI is then updated on the next key press to show the font as "Fixed Width"). This is because selecting the "Variable Width" will always end the current font styling. But when we are in the Preformat state, "Fixed Width" font should have the same effect.

Summary: Font regions in preformat do not close properly → Font regions in preformat do not close properly on selecting Fixed Width

NOTE: There are commented out test lines that can be uncommented when this is fixed https://searchfox.org/comm-central/search?q=1718563&path=&case=true&regexp=false

You need to log in before you can comment on or make changes to this bug.