案例 ce-0011 · 场景 scenario-formatting-persistence

Bold formatting is lost when typing after applying bold

操作系统: macOS 14.0 设备: Desktop or Laptop Any 浏览器: Safari 17.0 键盘: US 草稿
formattingboldsafari

此页面尚未翻译

目前显示的是英文原文。欢迎您参与翻译工作。

Phenomenon

When applying bold formatting to selected text and then continuing to type, the bold formatting is not maintained for the newly typed characters in Safari.

Reproduction example

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

Observed behavior

  • In Safari, newly typed characters after the bold text are not bold.
  • 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.

此场景的变体

案例 操作系统 浏览器 状态
ce-0011 macOS 14.0 Safari 17.0 草稿
ce-0021 Windows 11 Chrome 120.0 草稿
ce-0029 Windows 11 Edge 120.0 草稿
ce-0031 Linux Ubuntu 22.04 Firefox 120.0 草稿

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: macOS 14.0
Device: Desktop or Laptop Any
Browser: Safari 17.0
Keyboard: US
Your environment

Use this editable area to reproduce the described case.

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.