Opened 13 years ago

Closed 11 years ago

#8663 closed Bug (fixed)

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

Reported by: Piotrek Koszuliński Owned by: Piotrek Koszuliński
Priority: Normal Milestone: CKEditor 4.3.4
Component: General Version: 3.2.2
Keywords: Cc:

Description

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

Change History (4)

comment:1 Changed 13 years ago by Jakub Ś

Status: newconfirmed
Version: 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' );
console.log(element.getName());
});

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

comment:2 Changed 11 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.3.4
Owner: set to Piotrek Koszuliński
Status: confirmedreview

Pushed branch:t/8663 on dev and test.

comment:3 Changed 11 years ago by Frederico Caldeira Knabben

Status: reviewreview_passed

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

comment:4 Changed 11 years ago by Piotrek Koszuliński

Resolution: fixed
Status: review_passedclosed

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

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