Opened 5 years ago

Closed 3 years ago

#8663 closed Bug (fixed)

Method dom.element#renameNode() should clear #getName() cache

Reported by: Reinmar Owned by: Reinmar
Priority: Normal Milestone: CKEditor 4.3.4
Component: General Version: 3.2.2
Keywords: Cc:


element = CKEDITOR.dom.element.createFromHtml( '<div></div>' );
element.renameNode( 'p' );
assert.areEqual( 'p', element.getName() ); // actual: 'div'

Change History (4)

comment:1 Changed 5 years ago by j.swiderski

  • Status changed from new to confirmed
  • Version set to 3.2.2

Can be also checked in browser with the below code:

var editor = CKEDITOR.replace( 'editor1' , {});	
editor.on( 'instanceReady', function( ev )
element = CKEDITOR.dom.element.createFromHtml( '<div></div>' );
element.renameNode( 'p' );

Reproducible from CKEditor 3.2.2 (Before this version error was thrown).

comment:2 Changed 3 years ago by Reinmar

  • Milestone set to CKEditor 4.3.4
  • Owner set to Reinmar
  • Status changed from confirmed to review

Pushed branch:t/8663 on dev and test.

comment:3 Changed 3 years ago by fredck

  • Status changed from review to review_passed

I've added a new test that guarantees the efficiency of the trick used in this fix. Interesting trick, btw.

comment:4 Changed 3 years ago by Reinmar

  • Resolution set to fixed
  • Status changed from review_passed to closed

Fixed on master with git:662fc078 on dev and 6a62118 on tests.

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