Commit 56c284e
Preserve TextInput selection color when changing multiline (#57748)
Summary:
- Preserve the native text input tint color when switching between single-line and multiline backing views.
- Add a native regression test for copying the tint from `RCTUITextField` to `RCTUITextView`.
Fabric replaces the backing text input view when `multiline` changes. `RCTCopyBackedTextInput` preserved the other native presentation properties but omitted `tintColor`, which implements `selectionColor` on iOS. Since the React prop itself was unchanged, the normal prop diff did not apply it again and the selection color fell back to the system tint.
Fixes #57105
## Changelog:
[IOS] [FIXED] - Preserve TextInput selection color when changing multiline.
Pull Request resolved: #57748
Test Plan:
- Added `RCTTextInputUtilsTest.testCopyBackedTextInputPreservesTintColor`.
- Ran clang-format validation and `git diff --check`.
Reviewed By: javache
Differential Revision: D113980213
Pulled By: Abbondanzo
fbshipit-source-id: 73a5f87e1b45b504f4640572b8c1a26b4d97f43f1 parent adde1e5 commit 56c284e
2 files changed
Lines changed: 30 additions & 0 deletions
File tree
- packages/react-native/React
- Fabric/Mounting/ComponentViews/TextInput
- Tests/Text
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments