Repository navigation
fix(core): iOS scrollableHeight and scrollableWidth include the end content inset - #11548
Merged
Merged
Conversation
…ontent inset Since scrollToVerticalOffset sets the offset exactly (#11409), scrollToVerticalOffset(scrollableHeight) stops a bottom inset short of the end: a keyboard or docked composer that sets contentInset.bottom hides the last lines. scrollableHeight and scrollableWidth now report the largest offset a scroll reaches, adjustedContentInset.bottom (right) included.
|
View your CI Pipeline Execution ↗ for commit 5bf8ef4
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
commit: |
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.
Since #11409, iOS
scrollToVerticalOffsetclamps to the real end of the content. ButscrollableHeightis stillcontentSize - bounds, which leaves out the content inset. So with the keyboard up (or any bottom inset),scrollToVerticalOffset(scrollableHeight)now stops one inset short of the end. Before #11409 it overshot and happened to land at the end. Apps that keep a chat or streamed list pinned to the bottom this way show the latest content under the keyboard on 9.1.3.scrollableHeightandscrollableWidthnow include the bottom and rightadjustedContentInseton iOS, so they name the true end offset again.Tests: TKUnit cases for vertical and horizontal ScrollViews with an end inset.