Closed
Bug 1143332
Opened 10 years ago
Closed 10 years ago
Cut is Broken
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: alex, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 2015030500
Steps to reproduce:
Cut one or more paragraphs of contenteditable divs. Move the cursor up a couple of paragraphs. Shortly after the cursor is moved, the content below the cut moves up further than it did after the cut. Now try to undo. It fails on all platforms. The same results happen on both the Windows and Linux versions. I have not tested on OSX.
Actual results:
Shortly after the cursor was moved, the content below the cut moved up because the content inside the old cursor position collapsed and was wiped out. As a result, undo will not work and content beyond the cut is lost.
Expected results:
Moving the cursor should not have caused more content to be removed. It should also not have broken undo.
Comment 1•10 years ago
|
||
> Cut one or more paragraphs of contenteditable divs.
I have no idea how to do that in Firefox itself. Please provide steps to reproduce.
Flags: needinfo?(alex)
I made a jsfiddle and bisected the issue. I had some code in my javascript that was a workaround for a firefox bug that was resolved in the 36 branch. It turns out that my workaround code while it is necessary prior to 36 causes the issue I described in 36, but not in prior versions. The issue I was working around is that a div without content inside (non-breaking space or element node(s) can collapse and break the dom tree. The easiest way to create the issue was to have a div with a non-breaking space inside it then delete it while in contenteditable mode. All the elements below the div would become orphans...
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Flags: needinfo?(alex)
Resolution: --- → INVALID
Updated•10 years ago
|
Keywords: testcase-wanted
You need to log in
before you can comment on or make changes to this bug.
Description
•