Small tweak to nohover to only start timeout on requestanimationframe (#1398)

This commit is contained in:
Evan Simkowitz 2024-12-05 17:25:02 -05:00 committed by GitHub
parent cb50023d79
commit 898d21d1b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<Client>(WOS.makeORef("client", savedInitOpts.clientId));
const waveWindow = await WOS.reloadWaveObject<WaveWindow>(WOS.makeORef("window", savedInitOpts.windowId));