From cd3c4462d1ccfb74b64fd31a83bac7cd483d503c Mon Sep 17 00:00:00 2001 From: Local Dev Date: Wed, 2 Sep 2026 22:16:09 +0200 Subject: [PATCH] fix(theseus/chrome): self-heal chrome-view height drift every 750ms The onTabs / onNav re-sync catches the common menu-close path, but a menu that gets orphaned by a drag interruption, a focus flip, or a submenu race can leave the chrome view taller than the natural body-scrollHeight until the next tabs/nav event fires. Symptom: a huge blank strip between the address bar and the page that grows and doesn't shrink until the tab changes. Fix: a 750ms interval that re-runs syncHeight whenever no .ctxmenu / .grouppop is present. setChromeHeight in main.js only re-layouts when the value actually changes, so this is a cheap no-op in the steady state. Holding the ship: will bundle with the next batch per the slower-cadence policy. Users on 0.3.5 keep the existing gap fix; this one lands with the next release. --- chrome.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome.html b/chrome.html index 4708acf..8bfdab9 100644 --- a/chrome.html +++ b/chrome.html @@ -885,6 +885,11 @@ }); syncHeight(); + // Self-heal: some menu-close paths (drag interruptions, focus flips) can + // leave the chrome view taller than the natural body-scrollHeight. Every + // 750 ms with no menu open, re-sync — main.js only re-layouts when the + // value actually changes, so this is a cheap no-op in the steady state. + setInterval(() => { if (!document.querySelector(".ctxmenu, .grouppop")) syncHeight(); }, 750);