Ticket #5033 (closed Bug: invalid)

Opened 4 years ago

Last modified 3 years ago

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:1 Changed 4 years ago by fredck

  • Milestone set to CKEditor 3.3

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.

comment:2 Changed 4 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:3 Changed 4 years ago by garry.yao

Oops, correction - The selection is not put by us.

comment:4 Changed 4 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.

comment:5 Changed 4 years ago by fredck

  • Milestone CKEditor 3.x deleted

Milestone CKEditor 3.x deleted

comment:6 Changed 3 years ago by j.swiderski

  • Status changed from pending to closed
  • Resolution set to invalid

After consulting with @wwalc, I'm closing this one as invalid.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy