Case ce-0098-list-item-deletion-firefox · Scenario scenario-list-item-deletion

Backspace at beginning of list item may delete entire list in Firefox

OS: Windows 11 Device: Desktop or Laptop Any Browser: Firefox 120.0 Keyboard: US Status: draft
list deletion backspace firefox

Phenomenon

When pressing Backspace at the beginning of a list item in Firefox, the entire list may be deleted or unexpected nested structures may be created. This behavior differs from Chrome, which converts the list item to a paragraph.

Reproduction example

  1. Create a list with items: <ul><li>Item 1</li><li>Item 2</li></ul>
  2. Place cursor at the very beginning of the first list item
  3. Press Backspace

Observed behavior

  • The entire list may be deleted
  • Or nested list structures may be created unexpectedly
  • List items may be converted to paragraphs in an inconsistent way
  • DOM structure may become malformed

Expected behavior

  • The list item should be deleted while maintaining list structure
  • Remaining list items should stay in the list
  • Behavior should be consistent with Chrome

Browser Comparison

  • Chrome/Edge: Converts list item to paragraph (more predictable)
  • Firefox: May delete entire list (this case)
  • Safari: May create empty list items

Notes and possible direction for workarounds

  • Intercept beforeinput events to prevent default behavior
  • Implement custom deletion that maintains list structure
  • Check for list context before allowing deletion
  • Normalize DOM structure after deletion operations
Before
  • Item 1
  • Item 2
List structure, cursor at start of first item
After Backspace (Bug)
Backspace deletes entire list
vs
✅ Expected
  • Item 2
Expected: Only first item deleted, list structure maintained

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-0097-list-item-deletion-chrome Windows 11 Desktop or Laptop Any Chrome 120.0 US draft
ce-0098-list-item-deletion-firefox Windows 11 Desktop or Laptop Any Firefox 120.0 US draft
ce-0151-list-item-empty-after-delete Windows 11 Desktop or Laptop Any Safari 17.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: Firefox 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.