diff --git a/list-editor/index.js b/list-editor/index.js index 8573b34..800a2a1 100644 --- a/list-editor/index.js +++ b/list-editor/index.js @@ -11,6 +11,7 @@ textareaAutosizeInit($) function editor(root, inputData, options) { root.classList.add('root') + root.setAttribute('tabindex', '-1') let cursor = createCursor() let selection = createSelection() @@ -227,6 +228,8 @@ function editor(root, inputData, options) { trigger('stop-editing', currentEditor[0]) editing = false currentEditor = null + + $(root).focus() } /**