diff --git a/src/element/textWysiwyg.tsx b/src/element/textWysiwyg.tsx index 2a732caf..32afe6ca 100644 --- a/src/element/textWysiwyg.tsx +++ b/src/element/textWysiwyg.tsx @@ -139,6 +139,12 @@ export function textWysiwyg({ } function cleanup() { + // remove events to ensure they don't late-fire + editable.onblur = null; + editable.onpaste = null; + editable.oninput = null; + editable.onkeydown = null; + window.removeEventListener("wheel", stopEvent, true); document.body.removeChild(editable); }