diff --git a/src/components/App.tsx b/src/components/App.tsx index 5c8c0df8..be3b2c99 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -474,6 +474,14 @@ class App extends React.Component { window.history.replaceState({}, "Excalidraw", window.location.origin); } } else { + // https://github.com/excalidraw/excalidraw/issues/1919 + if (document.hidden) { + window.addEventListener("focus", () => this.initializeScene(), { + once: true, + }); + return; + } + isCollaborationScene = false; window.history.replaceState({}, "Excalidraw", window.location.origin); }