Count a bottom bar that stops above the home indicator when placing the rail
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user