diff --git a/frontend/wave.ts b/frontend/wave.ts index c296de862..497bbae12 100644 --- a/frontend/wave.ts +++ b/frontend/wave.ts @@ -92,9 +92,11 @@ async function reinitWave() { // We use this hack to prevent a flicker of the previously-hovered tab when this view was last active. This class is set in setActiveTab in global.ts. See tab.scss for where this class is used. // Also overrides the staticTabAtom to the new tab id so that the active tab is set correctly. globalStore.set(overrideStaticTabAtom, savedInitOpts.tabId); - setTimeout(() => { - document.body.classList.remove("nohover"); - }, 100); + requestAnimationFrame(() => + setTimeout(() => { + document.body.classList.remove("nohover"); + }, 100) + ); const client = await WOS.reloadWaveObject(WOS.makeORef("client", savedInitOpts.clientId)); const waveWindow = await WOS.reloadWaveObject(WOS.makeORef("window", savedInitOpts.windowId));