Case ce-0060 · Scenario scenario-text-direction

Text direction (dir attribute) changes are not applied during editing

OS: Windows 11 Device: Desktop or Laptop Any Browser: Firefox 120.0 Keyboard: Arabic Status: draft
direction rtl ltr firefox

Phenomenon

When the dir attribute is changed dynamically on a contenteditable region (e.g., switching between ltr and rtl), the text direction may not update correctly during active editing in Firefox. The caret position and text flow may be incorrect.

Reproduction example

  1. Create a contenteditable div with dir="ltr".
  2. Start typing some text.
  3. Change dir to "rtl" programmatically.
  4. Continue typing.
  5. Observe the text direction and caret position.

Observed behavior

  • In Firefox on Windows, changing dir during editing may not take effect immediately.
  • The caret position may be incorrect.
  • Text flow may not update properly.

Expected behavior

  • The dir attribute should update text direction immediately.
  • Caret position should adjust correctly.
  • Text flow should reflect the new direction.

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: Firefox 120.0
Keyboard: Arabic
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.