diff --git a/js/FocusManager.js b/js/FocusManager.js index bd9e36255f44f7d0c92e5fa431fa86d4a8931794..c62709f552f37203ee55a0c11bbaa145162317d8 100644 --- a/js/FocusManager.js +++ b/js/FocusManager.js @@ -183,6 +183,10 @@ return currentEditorInstance; } + if (this._$textareas.length) { + return this._$textareas.get(0); + } + return null; } diff --git a/js/editors/CKEditor.js b/js/editors/CKEditor.js index acd14bc794b58d6693a71f1b74b02b24746a76cd..066ed4bde714506397062e69fc4bae5bf3deea97 100644 --- a/js/editors/CKEditor.js +++ b/js/editors/CKEditor.js @@ -62,7 +62,7 @@ * @inheritDoc */ getCurrentInstance: function() { - return CKEDITOR.currentInstance; + return CKEDITOR?.currentInstance; }, /**