Webkit: insertElement() not working as expected for inline elements
|Reported by:||tmonahan||Owned by:||garry.yao|
The formatting of elements changes when inserting multiple elements into the editor in Webkit browsers.
- Save the attached file into the _samples directory and open it in Chrome or Safari.
- Click the 'Insert Elements' button. This should add a paragraph of text to the editor and an image below it.
Problem: The image is inserted after the text, rather than below it in webkit browsers.
The generated HTML in webkit browsers is:
<p> Text goes here<img src="http://a.cksource.com/c/1/inc/img/demo-little-red.jpg" /></p>
Other browsers correctly add a new paragraph for the image:
<p> Text goes here</p> <p> <img src="http://a.cksource.com/c/1/inc/img/demo-little-red.jpg" /></p>
This only seems to occur when an inline element is inserted after a block level element. We can reproduce this when the first element is a <p> or <div> and the 2nd element is a <img>, <iframe>, <a>, <span> etc.
This seems like it could be a webkit issue, however ticket #8412 describes an issue in Opera which could be related.
Change History (21)
Changed 5 years ago by tmonahan
comment:1 Changed 5 years ago by j.swiderski
- Status changed from new to confirmed
- Version changed from 3.6.4 (SVN - trunk) to 3.0
Changed 5 years ago by j.swiderski
comment:2 follow-up: ↓ 4 Changed 4 years ago by garry.yao
- Milestone set to CKEditor 3.6.4
- Owner set to garry.yao
- Status changed from confirmed to review
comment:4 in reply to: ↑ 2 Changed 4 years ago by fredck
- Status changed from review to review_failed
comment:11 follow-up: ↓ 12 Changed 4 years ago by garry.yao
- Status changed from review_failed to review
comment:12 in reply to: ↑ 11 Changed 4 years ago by fredck
- Status changed from review to review_passed