diff --git a/online-editor.js b/online-editor.js index dac18c9..28f5239 100644 --- a/online-editor.js +++ b/online-editor.js @@ -152,13 +152,13 @@ async function besProof(el) { function besHandleBeforeInput(editorId, event) { let editor = besEditors[editorId] if (editor.timer) clearTimeout(editor.timer) + let edit = document.getElementById(editorId) editor.timer = setTimeout(function () { besProof(edit) }, 1000) // No need to invalidate elements after range.startContainer since they will // get either deleted or replaced. - let edit = document.getElementById(editorId) event .getTargetRanges() .forEach(range =>