Opened 12 years ago
Last modified 11 years ago
#10404 confirmed Bug
Strange insertHTML behaviour with FF 20.0.1 after selectRanges and hide/show
Reported by: | martin | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Editable | Version: | 3.6.4 |
Keywords: | Firefox | Cc: |
Description
Firefox Version: 20.0.1
I am not sure if this is a ckeditor issue or a FF bug. But since I wasn't able to reproduce it with a plain contentEditable div I am reporting it here first.
Reproducible on the Demo Page:
Copy/execute the code line by line, don't execute the block as a whole. Apperently there is a timing component to this bug, that I wasn't able to reproduce it with setTimeout.
var cke = CKEDITOR.instances.editor1; var r = cke.getSelection().getRanges(); jQuery('#demo-standard').hide(); jQuery('#demo-standard').show(); cke.getSelection().selectRanges(r); cke.insertHtml('<img src="http://b.cksource.com/a/1/img/sample.jpg" />');
After that, if you doubleclick the inserted img. A phantom image appears that is not inside the Browser DOM and dissapears when the text is edited.
I tested this against release/4.1.x 3cb9cc24ed187a8ad29b810798f3427cc45a6fcf
This Code is my attempt at a workaround for Issue #10402. Any tips on how to workaround those two problems is appreciated.
Change History (1)
comment:1 Changed 11 years ago by
Keywords: | Firefox added |
---|---|
Status: | new → confirmed |
Version: | 4.1.1 → 3.6.4 |
I have tried this in latest Firefox 21. Executing whole code worked for me without problems but executing code one line by one caused phantom image to appear when double-clicking on inserted image.
This particular problem can be reproduced in Firefox only from CKEditor 3.6.4 rev. [7517] and is also reproducible in CKE 4.x
To test this is local branches you may use: