Closed
Bug 225437
Opened 22 years ago
Closed 1 year ago
Insert/HTML <br> does nothing in e.g. an empty document
Categories
(Core :: DOM: Editor, defect, P5)
Core
DOM: Editor
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: neil, Unassigned)
Details
Steps to reproduce problem:
1. Open an editor window
2. Use Insert/HTML to insert <br>
Actual results: no effect, although strangely the edit is undoable :-)
Expected results: blank line inserted
This also applies when the cursor is at the end of a block element whose content
does not end with a blank line. If the block's content already ends with a blank
line then a new blank line does get inserted.
Some additional cases that might be relevant:
1. New document
2. Insert/HTML <br>
3. Type X
X gets typed on the first line.
1. New document
2. Insert/HTML <br><br>
3. Type X
X gets typed on the third line, although the cursor was on the second line...
Updated•19 years ago
|
QA Contact: bugzilla → editor
Updated•19 years ago
|
Assignee: mozeditor → nobody
Comment 1•18 years ago
|
||
I'm encountering this bug in Firefox 3 Beta 2. I'm doing something like this:
var tempDoc = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null);
var br = tempDoc.createElement('br');
I then create a body element and append a lot of different tags inside that with brs here and there. All is then extracted from this tempDoc and appended to an iframe. Everything looks fine except the <br> tags are apparently ignored. Br tags are not ignored if I append them directly to the iframe instead of creating them in a this temporary document, but I can't always do this.
My current workaround is to use:
var br = tempDoc.importNode(document.createElement("br"), true);
But this assumes you have a "working" document to use.
I'm updating code for Firefox 3. I don't remember this problem in Firefox 1 or 2.
Comment 2•5 years ago
|
||
Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority and severity.
If you have reason to believe this is wrong, please write a comment and ni :jstutte.
Severity: minor → S4
Priority: -- → P5
Works as expected.
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•