Allow events on the editor by setting tabindex=-1

This commit is contained in:
Peter Stuifzand 2020-10-15 22:17:21 +02:00
parent 08eca99c16
commit 7867d1caa2

View File

@ -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()
}
/**