Opened 15 years ago
Closed 11 years ago
#5756 closed Bug (fixed)
Pasting block element in inline element breaks html and causes cursor panic
Reported by: | Arne | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Pasting | Version: | 3.0 |
Keywords: | IE | Cc: | satya_minnekanti@… |
Description
First bug:
- copy some html content which contains a paragraph(or any block
element)
- Clear content in editor
- Add a single word
- make word italic/bold
- place cursor inside the word.
- paste
- place cursor at the last character of the content
- press enter
Observation:
The cursor jumps to the top of the editor and content is shifted down.
Second bug:
Repeat steps 1-6 above.
- place cursor at the beginning of the last paragraph
- press enter
Observation:
The cursor remains on same paragraph but content is shifted up.
Tested and confirmed in
- FCKeditor 2.6.1
- FCKeditor 2.6.6
- CKEDITOR 3.2.1
HTML content before pasting :
<p><em>italic</em></p>
HTML after pasting :
<p><em>ita</p> <p>paragrapn</p> <p>lic</em></p>
I assume this behaviour is caused by the broken HTML
Change History (9)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Keywords: | WorksForMe added |
---|
I'm not able to reproduce it with CKEditor 3.3. Can you confirm it?
comment:3 Changed 15 years ago by
Yes, I reproduced it on the demo page.
I am pretty sure that the bug is related to the broken HTML caused by the IE browsers' native paste functionality. I tried the second patch in ticket #5309 and it doesn't break the HTML in the same way, and I can't reproduce the bug with that patch in IE8. (Implementing a context sensitive 'insertHtml' seems like the right way to go, but the patch still causes some IE7 errors)
Anyways, here are the exact steps I used for reproducing the bug last time I tried :
- Go to demo page.
- Clear all content
- Write a word and select it and copy it. Now try to paste it twice to make sure that you have copied the whole paragraph.
- Clear all content again.
- Write the word "italic" and make it italic.
- Place cursor in the middle of the word.
- Paste.
- Now position cursor after "lic" and hit enter. Observe the cursor jump to the top.
- Now position cursor before "lic" and hit enter. Observe that the cursor remains in the same position.
IE8 : A side effect I just noticed of reproducing this, is that Ctrl+A for selecting all text doesn't work after I have pasted.
Browsers :
IE7 - Version : 7.0.5730.13 - Windows Server 2008
IE8 - Version : 8.0.7600.16385 - Windows Server 2003 SP2
comment:4 Changed 14 years ago by
Component: | General → Core : Pasting |
---|---|
Keywords: | IE added |
Status: | pending → confirmed |
Version: | → 3.0 |
#6945 has been marked as a DUP.
comment:5 Changed 14 years ago by
Being a IE bug for years (any pasted block will not split up because of inline elements), we'll need simply a post-fixing solution if not having #5309.
comment:8 Changed 14 years ago by
Cc: | satya_minnekanti@… added |
---|
comment:9 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
I couldn't reproduce it at all, because of changes we made in CKEditor 4.0. Since then entire insertion process is handled by CKEditor, so such problems don't occur.
Applies to IE browsers