From aa92fb1f05478d3a6882b7d6361be2c001b09061 Mon Sep 17 00:00:00 2001 From: Jonathan Sykes Date: Tue, 22 Sep 2026 14:33:31 +0800 Subject: [PATCH] Count a bottom bar that stops above the home indicator when placing the rail --- frontend/app.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/app.js b/frontend/app.js index 4e3fe74..c6013ef 100755 --- a/frontend/app.js +++ b/frontend/app.js @@ -5590,8 +5590,12 @@ const SectionRail = (() => { if (!el || el.classList.contains('hidden')) continue; const box = el.getBoundingClientRect(); if (!box.height) continue; - // Only count it when it really is pinned to the bottom edge. - if (box.bottom >= window.innerHeight - 4) occupied = Math.max(occupied, window.innerHeight - box.top); + if (getComputedStyle(el).position !== 'fixed') continue; + // Count any fixed bar sitting in the lower half. It must NOT be required + // to touch the viewport bottom: on an iPhone XR the bottom nav ends + // above the home-indicator gap, so a "bottom >= innerHeight" test missed + // it entirely and the rail was parked underneath it. + if (box.top > window.innerHeight * 0.5) occupied = Math.max(occupied, window.innerHeight - box.top); } const want = Math.round(occupied + 14); if (st.bottom !== want) {