Case ce-0031-underline-formatting-firefox · Scenario scenario-formatting-persistence

Underline formatting is lost when typing after applying underline

OS: Linux Ubuntu 22.04 Device: Desktop or Laptop Any Browser: Firefox 120.0 Keyboard: US Status: draft
formatting underline firefox

Phenomenon

When applying underline formatting to selected text and then continuing to type, the underline formatting is not maintained for the newly typed characters in Firefox on Linux.

Reproduction example

  1. Create a contenteditable div.
  2. Type some text.
  3. Select the text and apply underline formatting (Ctrl+U or through execCommand).
  4. Place the caret at the end of the underlined text.
  5. Continue typing.

Observed behavior

  • In Firefox on Linux, newly typed characters after the underlined text are not underlined.
  • The formatting state appears to be lost when the caret moves.

Expected behavior

  • Newly typed characters should inherit the formatting of the preceding text when the caret is within or immediately after formatted text.
Before
Hello|
Underlined text, cursor (|) at the end
After Typing (Bug)
HelloWorld
Newly typed text not underlined
vs
✅ Expected
HelloWorld
Expected: Newly typed text also inherits underline

Browser compatibility matrix

This matrix shows which browser and OS combinations have documented cases for this scenario. The current case is highlighted. Click on a cell to view other cases.

Browser Linux Windows macOS
Chrome
Edge
Firefox
Safari
Current case
Confirmed
Draft
No case documented

All variants (detailed table)

Complete list of all cases for this scenario with full environment details.

Case OS Device Browser Keyboard Status
ce-0011-bold-formatting-lost macOS 14.0 Desktop or Laptop Any Safari 17.0 US draft
ce-0021-bold-formatting-chrome Windows 11 Desktop or Laptop Any Chrome 120.0 US draft
ce-0029-italic-formatting-edge Windows 11 Desktop or Laptop Any Edge 120.0 US draft
ce-0031-underline-formatting-firefox Linux Ubuntu 22.04 Desktop or Laptop Any Firefox 120.0 US draft

Playground for this case

Use the reported environment as a reference and record what happens in your environment while interacting with the editable area.

Reported environment
OS: Linux Ubuntu 22.04
Device: Desktop or Laptop Any
Browser: Firefox 120.0
Keyboard: US
Your environment
Sample HTML:
Event log
Use this log together with the case description when filing or updating an issue.
0 events
Interact with the editable area to see events here.

Comments & Discussion

Have questions, suggestions, or want to share your experience? Join the discussion below.