fix(keyboard): keep timeline pinned to bottom during iOS keyboard open/close#811
Closed
Just-Insane wants to merge 4 commits into
Closed
fix(keyboard): keep timeline pinned to bottom during iOS keyboard open/close#811Just-Insane wants to merge 4 commits into
Just-Insane wants to merge 4 commits into
Conversation
When the thread drawer is open alongside the main room view, two RoomInput components each mount their own useKeyboardHeight instance. On keyboard open the thread instance had savedHeight=0 (freshly mounted), so its immediate-estimate branch fell back to viewport.height — the wrong mid-animation value — and overwrote the correct estimate already written by the main room instance. This produced a third layout change (wrong height → correct height) visible as jank on every keyboard open. Fix: promote savedHeight, cssVarsSet, and the mount reference counter to module-level variables so all instances share them. - sharedSavedHeight: all instances read and write the same value, so the estimate is always correct even for newly-mounted instances. - cssVarsApplied: the 'only set once while keyboard open' guard now works across instances, preventing double setCSSVars calls. - mountCount: reference-counted so only the last instance to unmount clears the CSS variables — prevents the thread drawer unmounting while the main room keyboard is still open from wiping --sable-visible-height.
…yboard open - useKeyboardHeight: use previously-measured height as the initial estimate so the immediate setCSSVars call and the stability-timer call land on the same pixel value. This eliminates the second layout pass that caused visible stutter during the iOS keyboard slide-up animation. - RoomTimeline ResizeObserver: record lastProgrammaticBottomPinAtRef before scrollTo when the viewport shrinks while at bottom. This keeps handleVListScroll inside the settle window so atBottom stays true and the 'Jump to Present' button no longer flashes when the keyboard opens.
6 tasks
This was referenced May 14, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by #836 — consolidated with #810, #812, #813, #828, #829 into a single mobile/iOS/iPad PR.