案例 ce-0035 · 场景 scenario-backspace-granularity

Backspace deletes whole words instead of single characters

操作系统: macOS Ubuntu 22.04 设备: Desktop or Laptop Any 浏览器: Safari 120.0 键盘: US 草稿
backspacedeletiongranularitysafari

此页面尚未翻译

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

Phenomenon

In Safari on macOS, pressing Backspace may delete entire words instead of single characters, especially when the caret is positioned at word boundaries or after spaces.

Reproduction example

  1. Create a contenteditable div.
  2. Type some text with multiple words, e.g., “Hello world example”.
  3. Place the caret at the end of a word (after “world”).
  4. Press Backspace.
  5. Observe how much text is deleted.

Observed behavior

  • In Safari on macOS, Backspace may delete entire words.
  • The deletion granularity is inconsistent.
  • Sometimes single characters are deleted, sometimes whole words.

Expected behavior

  • Backspace should delete one character at a time by default.
  • Word-level deletion should only occur with modifier keys (e.g., Option+Backspace).
  • The behavior should be consistent and predictable.

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 Ubuntu 22.04
Device: Desktop or Laptop Any
Browser: Safari 120.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.