Case ce-0050 · Scenario scenario-delete-key-behavior

Delete key behavior is inconsistent with Backspace

OS: Linux Ubuntu 22.04 Device: Desktop or Laptop Any Browser: Firefox 120.0 Keyboard: US Status: draft
delete backspace consistency firefox

Phenomenon

In Firefox on Linux, the Delete key behaves differently from Backspace in ways that are inconsistent. Delete may remove different amounts of text or behave unexpectedly compared to Backspace.

Reproduction example

  1. Create a contenteditable div.
  2. Type some text.
  3. Place the caret in the middle of the text.
  4. Press Backspace and observe what is deleted.
  5. Press Delete and observe what is deleted.
  6. Compare the behaviors.

Observed behavior

  • In Firefox on Linux, Delete and Backspace may delete different amounts of text.
  • The granularity of deletion may be inconsistent.
  • Delete may behave unexpectedly in certain contexts.

Expected behavior

  • Delete should remove the character after the caret (forward deletion).
  • Backspace should remove the character before the caret (backward deletion).
  • Both should have consistent, predictable behavior.

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: Linux Ubuntu 22.04
Device: Desktop or Laptop Any
Browser: Firefox 120.0
Keyboard: US
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.