Bug: chat header scrolls off-screen when mobile keyboard opens (should stay sticky, body should compress) #30
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug (m, PWA-Voice 2026-05-09 11:57)
Symptom
When the on-screen keyboard appears on a mobile browser (iOS Safari, Android Chrome), the whole Paliad chat layout scrolls upward so the header gets pushed off-screen. The chat body doesn't shrink to make room for the keyboard — instead the entire surface translates up.
Expected (matching WhatsApp / Telegram / iMessage / any modern mobile chat):
Likely cause
Mobile-web viewport semantics. Common roots:
100vh/min-height: 100vhinstead of100dvh/100svh.vhis the large viewport height (no keyboard reservation), so when the keyboard appears the page is bigger than the visible area and the header disappears off the top.<meta name="viewport" content="..., interactive-widget=resizes-content">— the defaultinteractive-widget=overlays-content(Android Chrome since v108) makes the keyboard overlay rather than resize, leaving the layout unchanged but the chat input invisible.position: fixed/position: stickyon the wrong element, or stacking-context issues when the URL bar collapses.visualViewport.resize+ setting CSS custom property like--vvhand using that for the chat-container height.Expected fix shape
For SvelteKit / vanilla web:
100vhwith100dvh(dynamic viewport, accounts for browser-chrome + keyboard).<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content">.position: sticky; top: 0inside a flex column container withheight: 100dvh.flex: 1; overflow-y: auto— auto-shrinks when keyboard takes space.position: sticky; bottom: 0(orbottom: env(keyboard-inset-height, 0)for newer browsers).visualViewportJS listener that resizes the container manually. Common snippet:Reproduction
paliad.de(or wherever the chat surface lives) on a phoneOut of scope
Acceptance criteria
Refs
interactive-widgetviewport meta: https://developer.chrome.com/blog/viewport-resize-behavior