diff --git a/private/css/cms.tiptap.css b/private/css/cms.tiptap.css index 67bc033..687349a 100644 --- a/private/css/cms.tiptap.css +++ b/private/css/cms.tiptap.css @@ -38,6 +38,8 @@ p:not(.is-empty) > br.ProseMirror-trailingBreak { &.textarea.fixed .tiptap { border-top-left-radius: 0; border-top-right-radius: 0; + resize: vertical; + overflow-y: auto; } position: relative; a { diff --git a/private/js/cms.editor.js b/private/js/cms.editor.js index 9444898..28c2766 100644 --- a/private/js/cms.editor.js +++ b/private/js/cms.editor.js @@ -226,6 +226,8 @@ class CMSEditor { // CMS Editor: init_all initAll () { + // Save the active element + const active = document.activeElement; // Get global options from script element try { this._options = JSON.parse(document.getElementById('cms-editor-cfg').textContent); @@ -238,6 +240,10 @@ class CMSEditor { ); // Register all plugins on the page for inline editing this.initInlineEditors(); + // Re-focus the active element + if (active) { + active.focus(); + } } // CMS Editor: destroy