Bug 57150
Summary: | Deleteing lists in contentEditable/designMode produces DIV element | ||
---|---|---|---|
Product: | WebKit | Reporter: | Moxiecode Systems <spam> |
Component: | HTML Editing | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Aryeh Gregor
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
This is working as expected although it should be <p><br></p> instead of <div><br></div>. But that's a separate issue.