Ticket #8663 (closed Bug: fixed)

Opened 3 years ago

Last modified 15 months ago

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

comment:1 Changed 3 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 15 months ago by Reinmar

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

Pushed branch:t/8663 on dev and test.

comment:3 Changed 15 months 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 15 months ago by Reinmar

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

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

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