From 7867d1caa2a199e2d7a278809bed8badb3c7839e Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Thu, 15 Oct 2020 22:17:21 +0200 Subject: [PATCH] Allow events on the editor by setting tabindex=-1 --- list-editor/index.js | 3 +++ 1 file changed, 3 insertions(+) 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() } /**