Opened 16 years ago
Closed 13 years ago
#3453 closed Bug (fixed)
Content might get inserted inside <br>
Reported by: | Alfonso Martínez de Lizarrondo | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | SVN (CKEditor) - OLD |
Keywords: | Firefox | Cc: |
Description
Applies to both V2 and V3
Load sample.html?sample=enterkey
Set enterMode = br
switch to source and put for example
<h1>Test</h1>
switch to design
press enter at the end of Test, so a new line starts and the node path show that we are on body
Insert a smiley
Undo
Insert again a smiley
It doesn't appear. If you check the dom you'll see that the img is a child of BR.
Tested in Firefox.
Attachments (1)
Change History (11)
comment:1 Changed 16 years ago by
Keywords: | Confirmed added |
---|
comment:2 Changed 16 years ago by
Keywords: | Firefox added |
---|---|
Owner: | set to Garry Yao |
Status: | new → assigned |
Changed 16 years ago by
Attachment: | 3453.patch added |
---|
comment:3 Changed 16 years ago by
Keywords: | Review? added |
---|
comment:4 follow-up: 5 Changed 16 years ago by
BTW, the empty text node mentioned above is gen by L241 of enterykey logic:
// A text node is required by Gecko only to make the cursor blink. if ( CKEDITOR.env.gecko ) doc.createText( '' ).insertAfter( startBlock );
comment:5 Changed 16 years ago by
Replying to garry.yao: Wondering why we're having these lines since it WFM in both FF2 and FF3 to have the cursor blink even without the two lines.
comment:6 Changed 15 years ago by
Milestone: | → CKEditor 3.x |
---|
comment:8 Changed 14 years ago by
Status: | review → assigned |
---|
comment:9 Changed 14 years ago by
Keywords: | Firefox added; FirefoxConfirmed removed |
---|---|
Status: | assigned → pending |
I'm unable to reproduce anymore on FF3.6.16 and FF4.
Replying to alfonsoml: Nice catch, the problem here is the undo snap: the content is actually retrieved as document snapshot, which doesn't guarantee empty text node were well preserved, so when performing undo and load the saved snapshot, the original position is not any more correct due to the vanish of these empty text node.
It's impossible for us to avoid the existing of them, so a reasonable fix would be at createBookmark2 function, forcing it to jump out of empty text nodes.