Closed
Description
There is a weird edge case discovered from https://issues.liferay.com/browse/LPS-69981. Even though the way to reproduce it is in fact an application issue, we can improve the editor to avoid it.
It is as follows:
- CKEditor's ScriptLoader.load may run the callback synchronously if the scripts were already loaded.
- If
AlloyEditor.Strings
is null, but the CKEditor lang files have been requested, then the callback to_renderUI
will be invoked synchronously. - Down the path, this means that we start rendering before setting the
_editor
property which is the one returned onprops.editor.get('nativeEditor')
.
So, probably we just need to move the this._editor
assignment above the loadLanguageResources
call.