Bug 57150

Summary: Deleteing lists in contentEditable/designMode produces DIV element
Product: WebKit Reporter: Moxiecode Systems <spam>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: ayg, rniwa, styu007
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://tinymce.moxiecode.com/safari/delete_list.htm
Bug Depends on:    
Bug Blocks: 6627    

Moxiecode Systems
Reported 2011-03-26 07:36:43 PDT
Description: Deleteing lists in contentEditable/designMode produces DIV element it should produce an empty area or a BR element to place the caret. Steps to reproduce: 1. Open the attached URL. 2. Place caret behind the X inside editable area below. 3. Press backspace twice. 4. Click the Dump HTML link observe the HTML produced. Expected results: An empty editable area or BR element. Actual results: <div><br></div>
Attachments
Aryeh Gregor
Comment 1 2011-08-19 09:05:57 PDT
The specification says that this should produce <p><br></p>: http://aryeh.name/spec/editing/editing.html#the-delete-command It's the case "If node is an li or dt or dd and is the first child of its parent, and offset is zero:". The "fix disallowed ancestors" step below that will turn the <li> into a <p> if it's not the child of an <ol>/<ul>. This is in keeping with the spec's philosophy (adopted from IE/Opera) that every line should be wrapped in a <p> or other "single-line container" (as I chose to call them).
Ryosuke Niwa
Comment 2 2012-05-01 23:43:13 PDT
This is working as expected although it should be <p><br></p> instead of <div><br></div>. But that's a separate issue.
Note You need to log in before you can comment on or make changes to this bug.