Case ce-0106-font-family-persistence-safari · Scenario scenario-font-family-change

Font family does not persist when typing after applying in Safari

OS: macOS 14.0 Device: Desktop or Laptop Any Browser: Safari 17.0 Keyboard: US Status: draft
font typography safari

Phenomenon

When applying a font family to selected text in Safari and then continuing to type, the new text does not inherit the font family. The font formatting is lost for newly typed characters.

Reproduction example

  1. Select some text in a contenteditable element
  2. Apply a font family (e.g., “Arial”)
  3. Place cursor after the formatted text
  4. Type new text

Observed behavior

  • The newly typed text uses the default font, not the applied font
  • Font formatting is not maintained for new text
  • This differs from Chrome/Edge where font persists
  • User must reapply font for each new text segment

Expected behavior

  • Newly typed text should inherit the font family
  • Font formatting should persist until explicitly changed
  • Behavior should be consistent with Chrome/Edge

Browser Comparison

  • Chrome/Edge: Font family persists for new text
  • Firefox: Font persistence may be less reliable
  • Safari: Font does not persist (this case)

Notes and possible direction for workarounds

  • Intercept text insertion and apply font formatting
  • Use beforeinput event to detect text insertion
  • Apply font style to newly inserted text
  • Maintain font state for current typing position
Before
Hello|
Text with Arial font applied, cursor (|) at the end
After Typing (Bug)
HelloWorld
Newly typed text uses default font (Arial not inherited)
vs
✅ Expected
HelloWorld
Expected: Newly typed text also inherits Arial font

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-0106-font-family-persistence-safari macOS 14.0 Desktop or Laptop Any Safari 17.0 US draft
ce-0135-font-family-empty-style Windows 11 Desktop or Laptop Any Chrome 120.0 US draft
ce-0155-font-family-inheritance-issue Windows 11 Desktop or Laptop Any Firefox 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: macOS 14.0
Device: Desktop or Laptop Any
Browser: Safari 17.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.