-
Bug
-
Resolution: Fixed
-
Critical
-
4.4.6.3
-
Security Level: Jimmy
-
None
Steps to Reproduce
http://zkfiddle.org/sample/32ovgu2/1-ckeditor-memory-leak
Click the add editor button
Wait until the editor flickers in and out
Current Result
unbind doesn't clear editor
An unbound editor exist in JavaScript memory (can be found with zk.$('@ckeditor'))
clicking the popup button cause NPE due to unbound editor zWatch listener for Vparent
Expected Result
Editor should be cleaned up during unbind
Debug Info
https://github.com/zkoss/zkckeditor/blob/master/ckez/src/archive/web/js/ckez/CKeditor.js#L160
If the instance._editor field is null, the unbind method will go in the first if condition and will stop at:
https://github.com/zkoss/zkckeditor/blob/master/ckez/src/archive/web/js/ckez/CKeditor.js#L163
This can be caused by removing an editor instance before it is fully initialized
Root Cause
https://sourceforge.net/p/zk1/bugs/2205/