diff --git a/src/layouts/PublicLayout.tsx b/src/layouts/PublicLayout.tsx index c45a510..f208a95 100644 --- a/src/layouts/PublicLayout.tsx +++ b/src/layouts/PublicLayout.tsx @@ -421,9 +421,13 @@ export function PublicLayout() { setShowInlineNav((current) => { if (current) return needed <= available; - // Need real breathing room before switching back, to avoid flicker - // when the right-side width shrinks after the burger button hides. - return needed + 60 <= available; + // Hysteresis has to be wider than the right-side width difference + // between the two modes (“My Favorites / Kegemaran Saya” label + // shows in inline mode, ~80px). 60px was not enough and produced a + // dead zone (~1282–1302px in ms) where the header oscillated each + // frame. 120px keeps switching one-way — once we’re in burger we + // only flip back when there’s real headroom. + return needed + 120 <= available; }); }; @@ -813,20 +817,27 @@ export function PublicLayout() {