Opened 14 years ago

Closed 13 years ago

#5033 closed Bug (invalid)

Invalid behavior when inserting nested divs with insertHtml()

Reported by: Wiktor Walc 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 (6)

comment:1 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: 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 14 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 14 years ago by Garry Yao

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

comment:4 Changed 14 years ago by Garry Yao

Milestone: CKEditor 3.3CKEditor 3.x

Anyway, we'll defer issues that related to insertHtml usability.

comment:5 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

comment:6 Changed 13 years ago by Jakub Ś

Resolution: invalid
Status: pendingclosed

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

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy