﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
8869	IE6 : CKEDITOR.dom.node.replace() fails with invalid argument error	jfernandez_wa		"This code is somewhat sloppy but I had to kludge together an example from a plugin I'm trying to integrate.

Setup: I entered one word of text into CKEditor, which when you view source looks like this:

{{{
<p>
	word</p>
}}}

The following JavaScript works fine in Firefox, Chrome, and IE8:

{{{
	var new_node = CKEDITOR.dom.element.createFromHtml( '<span>Hello!</span>' );
	var old_node = CKEDITOR.instances.FCKeditor1.document.getDocumentElement().getChildren().getItem(1)['$'].childNodes[0];
	new_node.replace(CKEDITOR.dom.element.get(old_node));
}}}

All other browsers replace ""word"" with ""<span>Hello!<span>"". IE 6 throws an error indicating ""Invalid Argument.""

This may be related to [http://www.sencha.com/forum/archive/index.php/t-14131.html this EXT JS bug] where the author states ""Internet Explorer throws an exception when no target node is specified in a call to the insertBefore() method of a native DOM object (other browsers just append the new node at the end in this case).""

I have tried the workaround listed there but to no avail. Any help would be awesome :)
"	Bug	closed	Normal		General	3.0	wontfix	IE6 IE7	
