Case ce-0579 · Scenario scenario-ime-interaction-patterns

macOS: Double-space period breaks inclusive:false marks

OS: macOS 15.0 (Sequoia) Device: Desktop Any Browser: All Browsers (ProseMirror context) Latest (Nov 2025) Keyboard: Apple Magic Keyboard (US) Status: confirmed
macos ux auto-correct marks prosemirror

Phenomenon

A subtle but annoying interaction bug exists on macOS across all browsers when using rich text editors (like ProseMirror or Lexical). macOS has a system-level feature that replaces two spaces with a period and a space (. ). When this happens at the boundary of a “Mark” (like Bold or Code), the browser’s textInput or beforeinput replacement logic often uses the attributes of the logical start of the replacement range. If the mark is inclusive: false (meaning it shouldn’t expand to new characters), the auto-inserted period incorrectly “steals” the bold style.

Reproduction Steps

  1. Use a macOS device with “Add period with double-space” enabled in Keyboard settings.
  2. In a rich text editor, create a bold word. Ensure the bold mark configuration is non-inclusive on the right.
  3. Type a single space (it should be plain text).
  4. Type a second space.
  5. Watch the period appear.

Observed Behavior

  • Mark Expansion: The period becomes bold, extending the bold range unexpectedly.
  • Selection Desync: In some internal models, the replacement causes the editor to lose track of whether the caret is inside or outside the mark node, leading to “sticky” formatting for the next sentence.

Impact

  • Formatting Pollution: Users have to manually select and un-bold the periods at the end of every sentence.
  • Inconsistent Document Model: Programmatic checks that expect punctuation to be outside marks will fail.

Browser Comparison

  • macOS / Any Browser: Affected, as it is a system-level replacement event.
  • Windows / Chrome: Not affected (different auto-correct engine).

References & Solutions

Mitigation: Event Interception

Modern editors must explicitly handle inputType: "insertReplacementText" to detect the macOS period shortcut and manually apply the “Plain Text” schema to the resulting range.

1. Type Bold Word
Hello|
User types 'Hello' with a bold mark that is NOT inclusive on the right (inclusive: false).
2. First Space
Hello |
One space is added. It is NOT bold (correct behavior for non-inclusive mark).
vs
✅ Expected
Hello. |
Expected: The period should remain plain text, inheriting the style of the space it replaced, not the word before it.

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.

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-0002-ime-enter-breaks Windows 11 Desktop or Laptop Any Chrome 120.0 Korean (IME) draft
ce-0004-ime-backspace-removes-whole-syllable Windows 11 Desktop or Laptop Any Chrome 120.0 Korean (IME) draft
ce-0022-ime-enter-breaks-firefox Windows 11 Desktop or Laptop Any Firefox 120.0 Korean IME draft
ce-0030-backspace-composition-chrome macOS Ubuntu 22.04 Desktop or Laptop Any Chrome 120.0 Japanese IME draft
ce-0035-backspace-deletes-whole-word macOS Ubuntu 22.04 Desktop or Laptop Any Safari 120.0 US draft
ce-0042-input-events-duplicate Windows 11 Desktop or Laptop Any Edge 120.0 US draft
ce-0058-contenteditable-with-autocomplete macOS Ubuntu 22.04 Desktop or Laptop Any Chrome 120.0 US draft
ce-0070-contenteditable-with-autocapitalize iOS 17.0 iPhone Any Safari 17.0 US draft
ce-0071-contenteditable-with-autocorrect iOS 17.0 iPhone Any Safari 17.0 US draft
ce-0181-japanese-ime-enter-breaks-chrome Windows 11 Desktop or Laptop Any Chrome 120.0 Japanese (IME) draft
ce-0182-chinese-ime-enter-breaks-safari macOS 14.0 Desktop or Laptop Any Safari 17.0 Chinese (IME - Pinyin) draft
ce-0185-japanese-ime-backspace-granularity-chrome Windows 11 Desktop or Laptop Any Chrome 120.0 Japanese (IME) draft
ce-0186-chinese-ime-backspace-granularity-safari macOS 14.0 Desktop or Laptop Any Safari 17.0 Chinese (IME - Pinyin) draft
ce-0195-thai-ime-enter-breaks-chrome Windows 11 Desktop or Laptop Any Chrome 120.0 Thai (IME) draft
ce-0196-vietnamese-ime-enter-breaks-edge Windows 11 Desktop or Laptop Any Edge 120.0 Vietnamese (IME) draft
ce-0199-thai-ime-backspace-granularity-chrome Windows 11 Desktop or Laptop Any Chrome 120.0 Thai (IME) draft
ce-0200-vietnamese-ime-backspace-granularity-edge Windows 11 Desktop or Laptop Any Edge 120.0 Vietnamese (IME) draft
ce-0217-keyboard-handlers-iscomposing-false-ios-safari-korean iOS 17.0+ iPhone or iPad Any Safari 17.0+ Korean (IME) draft
ce-0565-chrome-121-oninput-offset-0 Windows 11 Desktop Any Chrome 121.0.6167.86 US QWERTY confirmed
ce-0579 macOS 15.0 (Sequoia) Desktop Any All Browsers (ProseMirror context) Latest (Nov 2025) Apple Magic Keyboard (US) confirmed
ce-0581 Android 14.0 / 15.0 Smartphone Any Chrome 131.0+ Gboard (Emoji) confirmed

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 15.0 (Sequoia)
Device: Desktop Any
Browser: All Browsers (ProseMirror context) Latest (Nov 2025)
Keyboard: Apple Magic 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.