﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
12258	Moving form with CKEditor through DOM	Rike		"Hi, I found a problem. I have one form instance on page and I move this via jQuery, where is needed. But after first move, CKEditor goes failed with error: 
{{{
TypeError: this.document.getWindow(...).$ is undefined
}}}

Minimal code: 

{{{
<!doctype html>
 <html>
 <head>
   <meta charset=""utf-8"" />
   <script src=""//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js""></script>
   <script src=""ckeditor/ckeditor.js""></script>
   <script src=""ckeditor/adapters/jquery.js""></script>
   <title>Test</title>
 </head>
 <body>
   <p><a href=""#"" id=""move"">Move CKEditor</a></p>
   <script>
   $(function(){
     $('#form_text').ckeditor();

     $('#move').on('click', function(e) {
       e.preventDefault();
       if($('#first>#form').size()>0) $('#form').appendTo('#second');
       else $('#form').appendTo('#first');
       });
   });
   </script>

   <div id=""first"" style=""min-height:200px;border:2px solid blue"">
     <form id=""form"">
       <textarea name=""form_text"" id=""form_text""></textarea><br />
     </form>
   </div>
   <div id=""second"" style=""min-height:200px;border:2px solid red;margin-top:1em""></div>
 </body>
 </html>
}}}
Tested: Gecko, WebKit."	Bug	closed	Normal		General	4.4.3	wontfix		
