From 1e4d8dc8aec1fc43cf301fefca62dd2ac50b37cf Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Mon, 7 Aug 2023 18:06:32 +0800 Subject: [PATCH] Unset node._load after unmounting --- packages/block-editor/src/components/iframe/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/block-editor/src/components/iframe/index.js b/packages/block-editor/src/components/iframe/index.js index 382d71c29071e0..85d7f03ac7114c 100644 --- a/packages/block-editor/src/components/iframe/index.js +++ b/packages/block-editor/src/components/iframe/index.js @@ -167,6 +167,7 @@ function Iframe( { node.addEventListener( 'load', onLoad ); return () => { + delete node._load; node.removeEventListener( 'load', onLoad ); iFrameDocument?.removeEventListener( 'dragover',