-
Bug
-
Resolution: Fixed
-
Normal
-
4.3.3.0
-
Security Level: Jimmy
-
None
the editor instance in added as the _editor property to the widget in a callback after the editor is properly initialized, and that there is a small delay after widget bind, and editor initialization.
If widget unbind happens before this process is over, the widget does not yet hold an _editor property during unbind.
Because of this missing _editor, the editor instance is not cleaned up, and the textarea node state is also not completely reset.
If widget bind happens again, it fails while crating a 2nd instance for the same dom element, plus other errors due to CKeditor not finding the textarea element anymore.
Reproduced with:
<zk> <ckeditor id="ckedit"/> <button label="click for rerender twice" xmlns:w="client" w:onClick="zk.$('@ckeditor').rerender(); setTimeout(function(){zk.$('@ckeditor').rerender();},100)"/> </zk>