Index: /CKEditor/tests/tt/8226/1.html
===================================================================
--- /CKEditor/tests/tt/8226/1.html	(revision 7186)
+++ /CKEditor/tests/tt/8226/1.html	(revision 7186)
@@ -0,0 +1,90 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Editor Destroy Test</title>
+  	<meta name="tags" content="editor,manual,all">
+  	<script type="text/javascript" src="../../cktester/cell.js"></script>
+	 <script>
+		  CKEDITOR.instances.instances = true;
+	  </script>
+	 
+  </head>
+  <body>
+  <pre>
+=== TC ===
+1. Click the "Start the tests" button;
+1. Log should indicate no errors thrown after running tests.
+  </pre>
+    <div>
+      <a href="javascript:;" onclick="runTests()">Start the tests</a>
+    </div>
+    <hr />
+
+    <div id="errors1">
+      <b>Errors on #1:</b><br />
+    </div>
+    <hr />
+
+    <div id="errors2">
+      <b>Errors on #2:</b><br />
+    </div>
+    <hr />
+
+	<form id="form1">
+      <textarea id="editor1">CKEditor #1</textarea>
+    </form>
+
+    <form id="form2">
+      <textarea id="editor2">CKEditor #2</textarea>
+    </form>
+
+    <script type="text/javascript">
+      function runTests() {
+        // Shouldn't create errors.
+        createCKEditor(1);
+        destroyCKEditor(1);
+
+        // If the editor instance isn't a descendant of document.body, things break.
+        createCKEditor(2);
+        destroyCKEditor(2, function() {
+          var new_el = document.createElement('div');
+          new_el.appendChild(document.getElementById('form2'));
+        });
+
+	  };
+
+      function createCKEditor(editor_id) {
+        window['ckInstanceReady'+editor_id] = false;
+        CKEDITOR.on('instanceReady', function(e) {
+          window['ckInstanceReady'+editor_id] = true;
+        });
+        CKEDITOR.replace(document.getElementById('editor'+editor_id));
+      };
+
+      function destroyCKEditor(editor_id, when_ready) {
+        window['ckInstanceInterval'+editor_id] = setInterval(function() {
+          if(window['ckInstanceReady'+editor_id]) {
+            clearInterval(window['ckInstanceInterval'+editor_id]);
+
+            if(typeof when_ready == 'function')
+              when_ready();
+
+            var ckinstance = CKEDITOR.instances['editor'+editor_id],
+              errors = document.getElementById('errors'+editor_id);
+
+            try {
+              ckinstance.destroy();
+              errors.innerHTML += 'No Errors';
+            } catch(err) {
+              //throw(err);
+              window.errors = err;
+              errors.innerHTML += err.message + '<br />' + err.stack;
+            }
+          }
+        }, 500);
+      }
+
+    </script>
+
+  </body>
+</html>
