mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix wysiwyg event cleanup (#1248)
This commit is contained in:
parent
290244660b
commit
81b38d8808
1 changed files with 6 additions and 0 deletions
|
@ -139,6 +139,12 @@ export function textWysiwyg({
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
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);
|
window.removeEventListener("wheel", stopEvent, true);
|
||||||
document.body.removeChild(editable);
|
document.body.removeChild(editable);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue