fix: phone app view zoom corrects

This commit is contained in:
2026-06-26 20:44:11 +00:00
parent 2a73033eed
commit a7901a66ae
2 changed files with 14 additions and 0 deletions
+10
View File
@@ -701,6 +701,16 @@
window.addEventListener("resize", nudgeAppHeight);
window.addEventListener("orientationchange", nudgeAppHeight);
// A rotation reflows the chat and iOS drops the scroll to mid-history. If we
// were pinned to the latest message, snap back there once the layout settles
// (re-fire across the reflow since iOS reports stale dimensions mid-rotate).
window.addEventListener("orientationchange", () => {
const m = document.getElementById("messages");
const wasAtBottom = m.scrollHeight - m.scrollTop - m.clientHeight < 90;
if (!wasAtBottom) return; // respect the user's scroll-up position
[100, 300, 600].forEach((t) => setTimeout(() => { m.scrollTop = m.scrollHeight; }, t));
});
// Keep the latest message in view when the keyboard opens/closes.
const userInputEl = document.getElementById("userInput");
userInputEl.addEventListener("focus", () => {
+4
View File
@@ -56,6 +56,10 @@ body.dark {
html {
overscroll-behavior: none;
/* Stop iOS from inflating font sizes when the device rotates to landscape (and
leaving them big on rotate back). Every other page sets this; the chat didn't. */
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
}
body {