Case ce-0117-nbsp-converted-to-space · Scenario scenario-content-normalization

Non-breaking spaces are converted to regular spaces during editing

OS: Windows 11 Device: Desktop or Laptop Any Browser: Chrome 120.0 Keyboard: US Status: draft
whitespace nbsp space chrome

Phenomenon

When editing text that contains non-breaking spaces ( ), they may be converted to regular spaces during editing operations. This breaks formatting that relies on non-breaking spaces.

Reproduction example

  1. Insert text with non-breaking spaces: Hello   World
  2. Edit the text (type, delete, etc.)
  3. Observe the DOM

Observed behavior

  • Non-breaking spaces are converted to regular spaces
  • Multiple spaces collapse to single space
  • Formatting that relies on nbsp is broken
  • Layout may change unexpectedly

Expected behavior

  • Non-breaking spaces should be preserved
  • Or conversion should be predictable
  • Formatting should remain intact
  • Behavior should be consistent

Browser Comparison

  • Chrome/Edge: May convert nbsp to space (this case)
  • Firefox: Similar conversion behavior
  • Safari: Conversion behavior varies

Notes and possible direction for workarounds

  • Monitor and preserve non-breaking spaces
  • Replace regular spaces with nbsp if needed
  • Use CSS white-space: pre-wrap to preserve spacing
  • Handle nbsp explicitly in paste operations
Before
Hello   World
Text with non-breaking spaces
After Editing (Bug)
Hello World
After editing,   converted to regular space, multiple spaces collapsed to one
vs
✅ Expected
Hello   World
Expected: Non-breaking spaces preserved

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-0102-consecutive-spaces-collapsed Windows 11 Desktop or Laptop Any Chrome 120.0 US draft
ce-0117-nbsp-converted-to-space Windows 11 Desktop or Laptop Any Chrome 120.0 US draft
ce-0153-nbsp-line-break-prevention Windows 11 Desktop or Laptop Any Chrome 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: Windows 11
Device: Desktop or Laptop Any
Browser: Chrome 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.