EditScreen: Wait until CodeMirror Library is initialized
Ensure that all logic that is dealing with CodeMirror is only executed
after the CodeMirror Library is initialized.
Most of the time the initialization of the CodeMirror Library finishes
first and all works fine, but sometimes CodeMirror related code is
executed before the CodeMirror Library is initialized. In this case
the EditScreen is not loaded and the error in the browser console is:
SEVERE: (TypeError) : $wnd.CodeMirror is undefinedClass$S126:
(TypeError) : $wnd.CodeMirror is undefined
On gerrit-review this issue is never hit, but it's reliably
reproducable with a local test system by going to the EditScreen and
then refreshing the browser.
Change-Id: I483822f84ad907c1587cd13bc2be3cc815c19874
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
1 file changed