Opened 7 years ago

Last modified 7 years ago

#8670 confirmed Bug

dom.node#getAddress returns different addresses for detached trees in IE7&8 than in normal browsers

Reported by: Piotrek Koszuliński Owned by:
Priority: Normal Milestone:
Component: General Version: 3.1.1
Keywords: IE Cc:

Description

This test passes in browsers like Fx and Chrome, but fails in IE7&8.

var root = newElement( 'span' ),
	child1 = newElement( 'span' ),
	child2 = newElement( 'span' );

child1.appendTo( root );
child2.appendTo( root );

assert.isTrue( CKEDITOR.tools.arrayCompare( child2.getAddress(), [ 1 ] ) ); // in IE7&8 - [ 0, 1 ]
assert.isTrue( CKEDITOR.tools.arrayCompare( root.getAddress(), [ ] ) ); // in IE7&8 - [ 0 ]

Change History (1)

comment:1 Changed 7 years ago by Jakub Ś

Keywords: IE added
Status: newconfirmed
Version: 3.1.1

Can be also tested in browser with :

var editor = CKEDITOR.replace( 'editor1' , {});				
editor.on( 'instanceReady', function( ev )
{					
var root = new CKEDITOR.dom.element( 'span' ),
child1 = new CKEDITOR.dom.element( 'span' ),
child2 = new CKEDITOR.dom.element( 'span' );
child1.appendTo( root );
child2.appendTo( root );

console.log(child2.getAddress());
console.log(root.getAddress());
console.log( CKEDITOR.tools.arrayCompare( child2.getAddress(), [ 1 ] ) ); // in IE7&8 - [ 0, 1 ]
console.log( CKEDITOR.tools.arrayCompare( root.getAddress(), [ ] ) ); // in IE7&8 - [ 0 ]
});

Reproducible in IE 6-8 (IE9 works fine) from CKEditor 3.1.1

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