diff --git a/src/shared/services/web-view.service.ts b/src/shared/services/web-view.service.ts index 1856900f43..3fa0ab468c 100644 --- a/src/shared/services/web-view.service.ts +++ b/src/shared/services/web-view.service.ts @@ -952,6 +952,8 @@ export const getWebView = async ( }; root.render(React.createElement(globalThis.webViewComponent, webViewProps)); + + window.addEventListener('unload', () => {root.unmount()}); } if (document.readyState === 'loading')