﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3368	Strange behavior when placed inside dynamically-created elements	Pedro Ferreira		"The following code:

{{{
#!js

     var div = document.createElement('div');
     var div2 = document.createElement('div');

     var editor = CKEDITOR.appendTo( div );
      document.getElementById('tests').appendChild(div);

      var button = document.createElement('button');
      button.innerHTML = 'click me';
      button.onclick = function(){
             editor.destroy();
	     editor = CKEDITOR.appendTo( div2 );
             document.getElementById('tests').appendChild(div2);
      };

      document.getElementById('buttons').appendChild(button);
}}}

Fails with:

{{{
holderElement is null
}}}

as soon as one clicks the button. I noticed this since I'm using CKeditor to implement some kind of ""click & edit"" rich text field, and I'm creating the containing div dynamically, each time the user clicks the field.

I could solve this by re-using the same div each time the field switches to edit mode, but that would be hacky, and I don't think CKeditor should fail here (correct me if I'm wrong, please).

Regards,

Pedro"	Bug	confirmed	Normal		General	SVN (CKEditor) - OLD			jose.pedro.ferreira@…
