Open Bug 348847 Opened 19 years ago Updated 1 year ago

After using select all & delete, there is no empty paragraph in editor

Categories

(Core :: DOM: Editor, defect, P5)

x86
Windows XP
defect

Tracking

()

UNCONFIRMED

People

(Reporter: jules, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 If you choose 'select all' and then 'delete' in the editor, all the content is replaced by a single <br> tag. This happens regardless of the setting of 'insertBrOnReturn', however that setting requires a <p> node to be present in the document in order to be functional. Reproducible: Always Steps to Reproduce: 1. Use the attached modified version of the midas demo page, which sets insertBrOnReturn to false and provides some text to edit 2. Use select all and delete to remove the text from the edit box 3. click 'View HTML Source' to see the result Actual Results: The HTML source contains '<br>'. If instead of clicking 'View HTML Source' you continue editing, pressing Return causes additional <br> tags to be inserted rather than <p> tags. Expected Results: On continuing to edit, return must cause <p> nodes to be inserted rather than <br> nodes. This can be achieved in two different ways: 1. Modify deletion so that <p></p> is left behind rather than <br> 2. Modify handling of return so that the <p></p> is not necessary, and leave the document completely empty when everything is deleted. Deleting everything should delete everything, not leave behind a <br> tag. Also note the <br> is an inline element and as such is not allowed directly within the <body> element of HTML4 strict documents. It would be useful if the editor could be put into a mode where it produced only conforming HTML4 strict documents, and removing this <br> kludge will be a necessary step in this process.
QA Contact: editor

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: