fix wysiwyg event cleanup (#1248)
This commit is contained in:
parent
290244660b
commit
81b38d8808
@ -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…
x
Reference in New Issue
Block a user