Repository navigation
Conversation
|
@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D126438495. |
…eact#59239) Summary: Pull Request resolved: react#59239 UIKit text change delegate callbacks now remain decision-only when JavaScript transforms an edit. The adapter rejects the original UIKit edit, records an implementation-private transaction, and applies an incremental `UITextInput` replacement on the next main-queue turn after validating the backing-view generation and base text. This preserves partial `maxLength` truncation without synchronously replacing the full attributed string or selection. Marked-text composition remains UIKit-owned; an over-limit committed value is corrected through the same deferred transaction path after composition ends. A runtime gate controls the new path. Stale edits are discarded when the backing text changes, lifecycle and JavaScript-driven updates invalidate queued transactions, and successful commits emit one change update plus the corresponding selection event. On tvOS, the deferred drain remains disabled because multiline text views are not editable. Changelog: [iOS][Fixed] - Preserve transformed `TextInput` edits without synchronously rewriting text inside UIKit delegate callbacks Differential Revision: D126438495
javache
force-pushed
the
export-D126438495
branch
from
October 20, 2026 17:16
d3ed44e to
a8cf4e7
Compare
|
This pull request has been merged in 6f67e18. |
Collaborator
|
This pull request was successfully merged by @javache in 6f67e18 When will my fix make it into a release? | How to file a pick request? |
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.
Summary:
UIKit text change delegate callbacks now remain decision-only when JavaScript transforms an edit. The adapter rejects the original UIKit edit, records an implementation-private transaction, and applies an incremental
UITextInputreplacement on the next main-queue turn after validating the backing-view generation and base text.This preserves partial
maxLengthtruncation without synchronously replacing the full attributed string or selection. Marked-text composition remains UIKit-owned; an over-limit committed value is corrected through the same deferred transaction path after composition ends. A runtime gate controls the new path.Stale edits are discarded when the backing text changes, lifecycle and JavaScript-driven updates invalidate queued transactions, and successful commits emit one change update plus the corresponding selection event. On tvOS, the deferred drain remains disabled because multiline text views are not editable.
Changelog:
[iOS][Fixed] - Preserve transformed
TextInputedits without synchronously rewriting text inside UIKit delegate callbacksDifferential Revision: D126438495