Closed Bug 483651 Opened 12 years ago Closed 9 years ago

Trailing <br> node not removed when it should be

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: graememcc, Assigned: graememcc)

References

(Depends on 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

When bug 132133, it ensured that the last node in non-empty non-single-line editors would be a <br> node. However, it proves very persistent - when all other content is removed from the tree, and it no longer serves any purpose, it should go away, and the special "bogus node" should reappear. Instead it sticks around.

Consequences of this include:
- documentIsEmpty reporting the wrong value
- deleting text in a <textarea> by a) manually backspacing through the text and b) select all followed by cut lead to different DOM trees
Attached patch Patch (obsolete) — Splinter Review
Proposed fix
Assignee: nobody → graememcc_firefox
Status: NEW → ASSIGNED
Attachment #367636 - Flags: superreview?(peterv)
Attachment #367636 - Flags: review?(peterv)
Depends on: 503838
Attachment #367636 - Flags: review?(ehsan)
Attached patch Updated patchSplinter Review
The patch looked good, I just updated it to apply cleanly on trunk.  I'll land it on mozilla-inbound.
Attachment #367636 - Attachment is obsolete: true
Attachment #552737 - Flags: review+
Attachment #367636 - Flags: superreview?(peterv)
Attachment #367636 - Flags: review?(peterv)
Attachment #367636 - Flags: review?(ehsan)
http://hg.mozilla.org/mozilla-central/rev/437f3eb67c18
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Depends on: 740784
You need to log in before you can comment on or make changes to this bug.