mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5710] [Issue]: Prevent iOS keyboard focus from scrolling the entire app shell #3156
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3156
Loading…
Add table
Add a link
Reference in a new issue
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?
Originally created by @SpicyMarinara on GitHub (Aug 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5710
Originally assigned to: @SpicyMarinara on GitHub.
Summary
On current
staging, focusing a chat field or double-tapping a Roleplay message to edit can still pan the entire iPhone app shell. The top bar moves with the page, and the transcript may repeatedly resist downward scrolling until the keyboard settles.Expected behavior
Only the chat transcript or active textarea should scroll. The fixed app shell and top bar must remain anchored throughout keyboard opening, editing, and dismissal.
Actual behavior
The software keyboard can move the document-level viewport. Marinara then moves its already fixed full-screen shell using the observed document scroll, producing the displaced shell visible in the reporter's screenshot. During the same settling period, attempts to move farther down the transcript can be counteracted.
Steps to reproduce
stagingimage and open a sufficiently long Roleplay chat on an iPhone.Environment
stagingimage)Logs, screenshots, or video
The original iPhone screenshot and behavior description are recorded in #5672, #5685, and the maintainer report. The reporter has now confirmed the behavior still occurs on staging after those fixes.
Additional context
Follow-up to #4260 and #5672. Current code inspection found a direct feedback path: both chat composers call
scrollIntoView()on focus, which may pan the iOS document, whileAppShellreadswindow.scrollYand applies it as a transform to the fixed full-screen shell. Mobile CSS hides overflow but does not fix and size the document root itself.Keep the correction narrow: lock the mobile document/root dimensions, skip document-scrolling focus assistance on iOS while retaining the Android path, and remove the full-shell scroll compensation transform. Add a regression that attempts document scrolling during simulated keyboard geometry and verifies only the transcript remains scrollable.
Implementation owner: @SpicyMarinara with Codex.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Aug 31, 2026):
Owned by @SpicyMarinara with Codex. Implementation is underway in draft PR #5712 against staging; the fix is scoped to the iOS document-scroll feedback loop while preserving Android keyboard handling.
@SpicyMarinara commented on GitHub (Sep 1, 2026):
Reopened after a fresh physical-iPhone report in Roleplay mode: tapping the composer can move the visible viewport completely below the app, leaving only the dark document backing visible above the keyboard. The chat can be recovered by manually scrolling upward, but focus must not move the app out of view.
This is the same focus-driven app-shell displacement tracked here, so it belongs on the existing issue rather than a duplicate. Current code inspection points to the mobile document lock added in #5712: the app shell is fixed inside a newly fixed
body, while iOS may still pan its visual viewport to reveal the focused textarea.Implementation owner: @SpicyMarinara with Codex, using branch
fix/5710-ios-roleplay-focus-empty-page. The fix will stay narrow and include an iPhone-sized WebKit regression for the visible shell geometry.@SpicyMarinara commented on GitHub (Sep 1, 2026):
Physical-iPhone verification on the latest staging build confirms #5732 did not resolve the displacement. The prior regression only varied visualViewport.offsetTop and missed the iOS document pan where pageTop can exceed offsetTop. @SpicyMarinara with Codex is continuing on branch
fix/5710-ios-visual-viewport-page-top; the follow-up will model that exact divergence before changing the shell.@SpicyMarinara commented on GitHub (Sep 1, 2026):
A new physical-iPhone report confirms the blank-screen displacement still occurs on the latest staging build after #5733. The attached before/after screenshots show Roleplay correctly anchored before focus, then the entire chat shell disappearing into the dark document backing while the keyboard remains open.
This matches the still-open WebKit keyboard-pan behavior: the document can be visually panned even when its scroll offsets remain zero, and fixed positioning is unreliable during that pan. Staging currently combines a fixed chat shell with an absolute visual-viewport top, which can apply the pan twice on the affected iPhone path.
Implementation owner: @SpicyMarinara with Codex, continuing on branch
fix/5710-ios-absolute-chat-shell. The follow-up is limited to using document-coordinate positioning for the iOS chat shell while preserving the existing visual-viewport height and Android path, with a regression that models the native body pan.@SpicyMarinara commented on GitHub (Sep 2, 2026):
A fresh physical-iPhone report confirms the blank Roleplay viewport still occurs on the latest staging build after #5739. The previous regression modeled only the case where WebKit shifts the fixed body by
-visualViewport.pageTop; it did not cover the reported coordinate space wherepageTopchanges while the fixed body remains visually anchored. In that case staging appliespageTopanyway and pushes the entire shell below the keyboard viewport.Implementation owner: @SpicyMarinara with Codex, continuing on branch
fix/5710-ios-fixed-body-coordinate-space. The follow-up will derive compensation from the body displacement WebKit actually renders, with regressions for both anchored-body and shifted-body behavior.@SpicyMarinara commented on GitHub (Sep 2, 2026):
Landed on
stagingvia #5782 at merge commitd76f8acec. The published multi-architecture Docker:stagingmanifest issha256:27db1ef84e6f098b01bd4a468e24763936e73de26a650bce67a720ae3a701398.The regression now covers both iOS behaviors:
visualViewport.pageTopchanging while the fixed body remains anchored, and a genuinely shifted body that needs counter-positioning. Please pull/recreate the staging container and physically verify composer focus, typing, transcript scrolling, and keyboard dismissal on the affected iPhone.@SpicyMarinara commented on GitHub (Sep 2, 2026):
A new physical-iPhone report reproduces the issue on current staging after #5782 and adds the same failure in the shared Create Character/Create Persona forms. That broader reproduction exposes the remaining root cause: the iOS chat shell and body-portal modals are still descendants of a fixed-position body, so WebKit can pan their common containing block when a focused control opens the keyboard. The previous patch compensated one observed Roleplay displacement but did not remove that shared fixed ancestor.
Implementation owner: @SpicyMarinara with Codex on branch
fix/5710-ios-shared-keyboard-viewport. I am replacing the iOS-only fixed body containment with a document-coordinate visual-viewport shell shared by AppShell and Modal, while leaving the Android/non-iOS path unchanged. Regression coverage will exercise both the Roleplay composer and an auto-focused Create Persona field.@SpicyMarinara commented on GitHub (Sep 2, 2026):
Landed on
stagingvia #5791 at merge commit15627d45bda80c5bbac17ee83cfd1b129c76f73b. The published multi-architecture Docker:stagingmanifest issha256:f3647d96f2dc42f380bcd5a109e19f9a9cf747dcd1372e4dc04165148e3a4cc5.This follow-up removes the remaining iOS fixed-body ancestor and gives both AppShell and shared Modal portals the same document-coordinate VisualViewport geometry. The regression now covers the Roleplay composer plus the auto-focused Create Persona field (the same Modal path used by Create Character). All required PR checks, CodeRabbit, container validation, and the rerun WebKit matrix passed.
Please pull/recreate the staging container and physically verify Roleplay typing plus Create Character/Create Persona focus on the affected iPhone.
@SpicyMarinara commented on GitHub (Sep 3, 2026):
Physical-iPhone verification on the latest staging build now isolates the remaining failure to repeated focus: the first Roleplay composer tap behaves correctly, but after dismissing the keyboard, every later tap displaces the app shell again. The current regression only covers a single keyboard-open cycle. Code inspection shows the offset clamp uses the current
window.innerHeight; WebKit can make that value match the shrunken visual viewport on later keyboard cycles, which collapses the allowed document-coordinate offset to zero even thoughvisualViewport.pageTopis still displaced.\n\nImplementation owner: @SpicyMarinara with Codex on branchfix/5710-ios-repeat-keyboard-focus. The follow-up will first reproduce open → dismiss → reopen with a resized layout viewport, then keep the pre-keyboard viewport baseline for the clamp without changing the non-iOS layout path.@SpicyMarinara commented on GitHub (Sep 3, 2026):
Landed the repeated-focus fix on
stagingvia #5816 at merge commit6aa81cb02e53593fa1adc0291f49893264754714. The published multi-architecture Docker:stagingmanifest issha256:0d6ed012e12c1059a89e2e8baed94f664b8ae52be53c80702a7db0d9a382a983, and its arm64 image is labeled with that exact merge commit.\n\nThe regression now covers keyboard open → dismiss → reopen while WebKit reportswindow.innerHeightas the shrunken visual viewport. The iOS shell retains the full-height baseline for its offset clamp, while Android and desktop keep their previous calculation. All required PR checks, every hosted WebKit/Chromium shard, CodeRabbit review, and container validation completed successfully.\n\nPlease pull/recreate the staging container and verify at least three Roleplay composer focus cycles on the affected iPhone. Create Character/Create Persona share the same shell viewport contract and should also remain anchored across repeated keyboard cycles.