]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/common-events.js
Added 'Sort Book' action to chapters
[bookstack] / resources / js / wysiwyg / common-events.js
index 7d3f1113e16ebf2318a47db4dfec9abb26031116..a25debac123d75c515814400f75ee44144600f40 100644 (file)
@@ -27,6 +27,8 @@ export function listen(editor) {
 
     // Focus on the editor
     window.$events.listen('editor::focus', () => {
-        editor.focus();
+        if (editor.initialized) {
+            editor.focus();
+        }
     });
 }
\ No newline at end of file