Repository navigation
Conversation
Contributor
|
Contributor
Member
Author
mozzius
marked this pull request as ready for review
October 26, 2026 12:16
Contributor
mozzius
requested review from
estrattonbailey
and removed request for
estrattonbailey
October 26, 2026 12:17
mozzius
marked this pull request as draft
October 26, 2026 12:19
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mozzius
force-pushed
the
samuel/app-3658-alt-text-reopen-overshoot
branch
from
October 26, 2026 15:58
94b903a to
26ed3db
Compare
This branch was successfully deployed
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.





Fixes APP-3658.
Problem
On iOS, reopening the alt text editor with a long alt text scrolls the sheet past the end of its content. The longer the text, the further it goes. With 30 lines the sheet opens completely blank. It's a regression in 1.136.0.
Root cause
position: absolutewith onlyleft/rightset, so that first layout shrinks to fit the content.flex: 1wrapper's flex basis at the content height (1620pt for 30 lines) and keeps it. Yoga only recomputes a basis when that node itself is dirtied. This is facebook/yoga#2019, the same bug as APP-2687; the fix is pending in facebook/yoga#2020.SheetViewthen sets the canvas to 812pt, synchronously, before presenting. That only dirties the sheet node, so its children reuse the stale 1620 basis.flex: 1doesn't shrink on native, so the content stays 1620pt tall. Short content still grows to fill the canvas, which is why only long alt text broke.automaticallyAdjustKeyboardInsetsis already on at that point, so RN sizes the keyboard inset from the 1620pt frame: 1153 instead of 335. The JSmaxHeightfromonPresentationSizeChangeshrinks the content to 802 right after (a node's own style change does clear its basis), but nothing recomputes the inset.Before #12121, RN skipped the inset entirely on that first keyboard show. That was APP-2673, and it hid all of this.
Native logging from a QA build, reopening 30 lines (the "chain" is the mounted views from the sheet down to the ScrollView):
Fix
Full-height iOS sheets now get
top: 0, bottom: 0as well asleft/right. That's the vertical twin of the APP-3602 width fallback. Their first layout then has a definite height, so Yoga never measures a content-sized basis, and the canvas size really does constrain the content before the sheet is presented.The inset now comes out at 345 rather than exactly 335. Until the presented size lands, the seeded canvas (window height minus the top safe area, 812) is 10pt taller than the sheet (802). It isn't visible in practice. A native change that attaches the content only after the sheet's first layout pass makes it exact (335). I prototyped and verified that change, but left it out to keep this PR JS-only. It can be a follow-up if we want it.
This replaces the first version of this PR, which deferred
Dialog.Inputautofocus. That version was dropped when the branch was rebased onto main.Testing
Tested on the iPhone 17 sim (iOS 26.5). The QA dev client had native logging and a launch-arg switch, so it could run the production native code paths.
Reopening 30 lines of alt text:
yoga-layoutscript reproduces the stale basis. With the insets, every wrapper goes 812 -> 802.pnpm typecheckand the bottom-sheet tests pass.Earlier comments on this PR are about the first version.
🤖 Generated with Claude Code