Open Bug 1716840 Opened 3 years ago Updated 2 years ago

UI not updated immediately when toggling some text styling.

Categories

(Thunderbird :: Message Compose Window, defect)

Thunderbird 91
defect

Tracking

(Not tracked)

People

(Reporter: henry-x, Unassigned)

References

Details

Steps to reproduce

  1. Open a new HTML message composition.
  2. Hit Ctr-T, or select through the menu "Format > Text Style > Fixed Width".

Result

The UI is not updated to show the change. The expected UI changes only occurs after typing in the message or re-clicking once in the same position.

The same problem happens when toggling "Fixed Width" off.

Note that the UI is updated immediately if the style is toggled whilst some text is selected.

Expect

As soon as the "Fixed Width" style is selected, the font selector should show "Fixed Width", and if I open the "Format > Text Style" menu, "Fixed Width" should be checked. When it is unselected, this should be reversed.

Discussion

The problem happens for:

  • Fixed Width
  • Nonbreaking
  • Emphasis
  • Stronger Emphasis
  • Citation
  • Abbreviation
  • Acronym
  • Code
  • Sample Output
  • Variable

You can verify this by opening the Text Style menu, selecting one, and reopening the menu and there is no visible change.

The following have the expected behaviour:

  • Bold
  • Italic
  • Underline
  • Strikethrough
  • Superscript
  • Subscript

One pattern I noticed was that the <command> for the ones that work use doStyleUICommand, whilst the rest use goDoCommand.

There are similar problems with the UI not updating for the toolbar font selector:

  • Checking the the Fixed Width, Code or Sample Output (without no text selection), the toolbar font selector should show the Fixed Width font, but this only shows after typing a character.
  • Selecting a font through the Format -> Font menu (with or without a text selection), the toolbar font selector will not change. Even after typing a character or reselecting on the same section of text.
See Also: → 1718225

(In reply to Henry Wilkes [:henry] from comment #1)

  • Selecting a font through the Format -> Font menu (with or without a text selection), the toolbar font selector will not change. Even after typing a character or reselecting on the same section of text.

Moved to Bug 1718225

See Also: → 1718227
See Also: → 1718534

(In reply to Henry Wilkes [:henry] from comment #1)

  • Checking the the Fixed Width, Code or Sample Output (without no text selection), the toolbar font selector should show the Fixed Width font, but this only shows after typing a character.

Similarly, when selecting from the font "Fixed Width" to a different font (with no text selection), the Format -> Text Style -> Fixed Width menu item will still be checked. This becomes unchecked (as expected) only when typing another character.

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

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