Opened 8 years ago

Closed 8 years ago

#6996 closed Bug (fixed)

destroy() behaves incorrectly if called too soon after instance created

Reported by: Michael Slusarz Owned by:
Priority: Normal Milestone:
Component: General Version: 3.4.3
Keywords: Cc: wkelley@…

Description

Example code:

<html>
 <head>
  <script type="text/javascript" src="ckeditor.js"></script>
 </head>
 <body>
  <textarea name="test" rows="20" id="test"></textarea>

  <script type="text/javascript">//<![CDATA[
  CKEDITOR.on('instanceReady', function(evt) {
      test_editor.destroy();
  });

  var test_editor = CKEDITOR.replace('test');
  //]]></script>

 </body>
</html>

Expected behavior: After the editor instance is destroyed, the original textarea should be restored.

Actual behavior: The editor instance is destroyed, but the original textarea is not restored. It still exists, but is hidden via a 'display:none' CSS attribute.

If the destroy() call is delayed at least a second after instanceReady is fired, the textarea is properly restored.

Change History (2)

comment:1 Changed 8 years ago by William Kelley

Cc: wkelley@… added

comment:2 Changed 8 years ago by Jakub Ś

Resolution: fixed
Status: newclosed

This was fixed in CKEditor 3.6.1 rev [6934]

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