Ticket #5033 (closed Bug: invalid)
Invalid behavior when inserting nested divs with insertHtml()
| Reported by: | wwalc | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | General | Version: | 3.0 |
| Keywords: | Cc: |
Description
Steps to reproduce
- open _samples/api.html
- paste this into textarea:
<div class="wrapper thing"><div class="other wrapper"><img src="myfile.jpg" /></div></div>
- click the InsertHTML button twice
- expected result:
<div class="wrapper thing"> <div class="other wrapper"> <img src="myfile.jpg" /></div> </div> <div class="wrapper thing"> <div class="other wrapper"> <img src="myfile.jpg" /></div> </div>
- actual result:
<div class="wrapper thing"> <div class="other wrapper"> <img src="myfile.jpg" /> <div class="wrapper thing"> <div class="other wrapper"> <img src="myfile.jpg" /></div> </div> </div> </div>
Change History
comment:2 Changed 3 years ago by garry.yao
- Keywords Pending added; Confirmed removed
The selection is putting by us but rather native 'insertHtml', not even a bug for me, for browsers are all agreed on the cursor position and what being correct for it is a case by case thing.
comment:4 Changed 3 years ago by garry.yao
- Milestone changed from CKEditor 3.3 to CKEditor 3.x
Anyway, we'll defer issues that related to insertHtml usability.
Note: See
TracTickets for help on using
tickets.

It looks like the selection is being moved to the first editing point inside the inserted HTML. We may have this being used in other parts of the code, so before making any change here, we must be sure we don't have dependencies on this.