remove visualViewport hack (needed for Safari)

This commit is contained in:
sawka 2024-06-21 13:27:21 -07:00
parent 516f1faa47
commit 312ee5af59

View File

@ -25,15 +25,8 @@ initWS();
(window as any).WOS = WOS; (window as any).WOS = WOS;
(window as any).globalStore = globalStore; (window as any).globalStore = globalStore;
function matchViewportSize() {
document.body.style.width = window.visualViewport.width + "px";
document.body.style.height = window.visualViewport.height + "px";
}
document.title = `The Next Wave (${windowId.substring(0, 8)})`; document.title = `The Next Wave (${windowId.substring(0, 8)})`;
matchViewportSize();
document.addEventListener("DOMContentLoaded", async () => { document.addEventListener("DOMContentLoaded", async () => {
console.log("DOMContentLoaded"); console.log("DOMContentLoaded");
// ensures client/window/workspace are loaded into the cache before rendering // ensures client/window/workspace are loaded into the cache before rendering
@ -49,6 +42,4 @@ document.addEventListener("DOMContentLoaded", async () => {
console.log("Wave First Render"); console.log("Wave First Render");
root.render(reactElem); root.render(reactElem);
}); });
const viewport = window.visualViewport;
viewport.addEventListener("resize", matchViewportSize);
}); });