Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(aot): Unmount AlwaysOnTop to remove listeners (#2307)

hristoterezovd6c3ab64fa3a
diff --git a/react/features/always-on-top/index.js b/react/features/always-on-top/index.js
index 1b4a92a403..6c2413d1cd 100644
--- a/react/features/always-on-top/index.js
+++ b/react/features/always-on-top/index.js
@@ -8,3 +8,7 @@ ReactDOM.render(
<AlwaysOnTop />,
document.getElementById('react')
);
+
+window.addEventListener('beforeunload', () => {
+ ReactDOM.unmountComponentAtNode(document.getElementById('react'));
+});