Keep the watch party panel above the bottom bars so its leave button is reachable

This commit is contained in:
Jonathan Sykes
2026-09-22 14:23:39 +08:00
parent 6c4571cb33
commit c9e021a045
2 changed files with 20 additions and 5 deletions

View File

@@ -5584,7 +5584,6 @@ const SectionRail = (() => {
// guessing an offset that is wrong on the next phone.
function placeRail() {
const r = rail();
if (!r || r.classList.contains('hidden')) return;
let occupied = 0;
for (const id of ['bottomNav', 'miniBar']) {
const el = document.getElementById(id);
@@ -5597,7 +5596,10 @@ const SectionRail = (() => {
const want = Math.round(occupied + 14);
if (st.bottom !== want) {
st.bottom = want;
r.style.setProperty('--rail-bottom', want + 'px');
if (r) r.style.setProperty('--rail-bottom', want + 'px');
// Published for anything else that must sit above the bottom bars —
// the watch-party panel's leave button was hidden behind them.
document.documentElement.style.setProperty('--bottom-chrome', Math.round(occupied) + 'px');
}
}