fix(ui): harden iOS safe-area and viewport regressions

This commit is contained in:
PR #6029 Reviewer
2026-10-20 11:39:51 +01:00
parent 8363919aec
commit 7fd4e0e9bb
6 changed files with 248 additions and 14 deletions
+3 -2
View File
@@ -267,8 +267,9 @@ export function makeWindowResizable(content, options = {}) {
content.style.maxWidth = 'none';
content.style.maxHeight = 'none';
const left = parseFloat(content.style.left);
if (Number.isFinite(left) && left + w > window.innerWidth - padRight) {
content.style.left = Math.max(padLeft, window.innerWidth - padRight - w) + 'px';
if (Number.isFinite(left)) {
const rightmostLeft = Math.max(padLeft, window.innerWidth - padRight - w);
content.style.left = Math.max(padLeft, Math.min(left, rightmostLeft)) + 'px';
}
}
} catch (_) {}