Case ce-0174-empty-div-after-list-removal · Scenario scenario-empty-element-cleanup

Empty div elements remain after removing list

OS: Windows 11 Device: Desktop or Laptop Any Browser: Chrome 120.0 Keyboard: US Status: draft
empty list div cleanup chrome

Phenomenon

When removing a list (converting list items to paragraphs) in Chrome, empty wrapper div elements may remain in the DOM. These empty divs cause layout issues and bloat the HTML.

Reproduction example

  1. Create a list: <ul><li>Item 1</li></ul>
  2. Remove the list (convert to paragraph)
  3. Observe the DOM structure

Observed behavior

  • Empty <div></div> elements may remain
  • Or divs with only whitespace remain
  • DOM becomes bloated
  • Layout has unexpected spacing

Expected behavior

  • Empty div elements should be removed
  • DOM should be clean
  • No unnecessary elements should remain
  • Structure should be normalized

Browser Comparison

  • Chrome/Edge: May leave empty divs (this case)
  • Firefox: More likely to leave empty elements
  • Safari: Most likely to accumulate empty elements

Notes and possible direction for workarounds

  • Clean up empty div elements after list removal
  • Remove wrapper elements if empty
  • Normalize DOM structure regularly
  • Remove unnecessary containers
Before
  • Item 1
List structure
After List Removal (Bug)

Item 1

After list removal, empty &lt;div&gt; element remains
vs
✅ Expected

Item 1

Expected: Empty div removed, clean DOM

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-0111-empty-elements-accumulate Windows 11 Desktop or Laptop Any Chrome 120.0 US draft
ce-0127-empty-paragraph-after-delete Windows 11 Desktop or Laptop Any Chrome 120.0 US draft
ce-0140-empty-span-style-attributes Windows 11 Desktop or Laptop Any Chrome 120.0 US draft
ce-0159-empty-elements-after-format-remove Windows 11 Desktop or Laptop Any Safari 17.0 US draft
ce-0174-empty-div-after-list-removal 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.