Repository navigation
fix(mobile): prevent recursive scroll corrections on ios - #936
Merged
Merged
Conversation
Guard synchronous scrollTo feedback while keyboard insets change. Record native offsets without redispatching or dropping following intent, and invalidate composer gesture travel before correcting. Fixes: #909
nixuuu
marked this pull request as ready for review
November 17, 2026 18:12
This was referenced Nov 17, 2026
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.
Opening or dismissing the iOS keyboard can synchronously re-enter the scroll handler while
useFollowingListis correcting native anchor displacement. If UIKit reports a clamped offset, the nested handler dispatches anotherscrollTobefore the first command returns, overflowing the UI-runtime stack. The reproduced iOS error contains hundreds of repeatedtrack → scrollTo → onScrollframes.Guard automatic corrections for the lifetime of the native command. Nested events retain the actual native offset and following intent without dispatching another correction. Increment the existing correction revision before dispatch so composer gesture tracking discards corrected events; release the guard in
finally. Update the mobile behavior documentation.Fixes: #909
Validation: