mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-11-04 04:44:31 +01:00 
			
		
		
		
	fix wysiwyg event cleanup (#1248)
This commit is contained in:
		@@ -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);
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user