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
- Create a contenteditable div.
- Type some text with multiple words, e.g., “Hello world example”.
- Place the caret at the end of a word (after “world”).
- Press Backspace.
- 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.