race issue loading plugins when editor already destroyed
|Reported by:||brian.mcnamara||Owned by:||Tade0|
See end of description for suggested fix.
Steps to reproduce
Find attached index.html which loads CKEditor script async and creates instance of ckeditor before quickly destroying the instance. To repo, place index.html in a directory along with the root ckeditor folder containing the source.
Directory should look like: /
Load index.html and open chrome developer tools. Press button (sometimes takes a few times). You will hopefully see ckeditor.js:formatted:16963Uncaught TypeError: Cannot read property 'customConfig' of undefined
Race conditions should be handled accordingly.
Plugin tries to load after editor.status === 'destroyed' and is unable to reference the editor instance.
Other details (browser, OS, CKEditor version, installed plugins)
My guess for the fix is in core/editor.js:596 the plugin loader's call back should check if editor.status === 'destroyed' and simply return. However there may need to be more clean up but this is my simple fix to prevent us from running into this issue. Maybe you all will have a more elegant solution :)
Change History (6)
Changed 11 months ago by brian.mcnamara
comment:2 Changed 3 months ago by Tade0
- Status changed from new to confirmed
- Version changed from 4.5.9 to 4.5.0
comment:3 Changed 2 months ago by j.swiderski
- Keywords race removed
- Resolution set to duplicate
- Status changed from confirmed to closed
- Version 4.5.0 deleted
comment:4 Changed 10 days ago by Tade0
- Resolution duplicate deleted
- Status changed from closed to reopened