fix: TextInput selectionColor
props on iOS
#44420
Closed
+1
−0
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:
This pull request fixes an issue where the
selectionColor
prop was not applied to theTextInput
component on iOS, starting from React Native version 0.74.x.This issue was introduced in PR 1e68e485 which relocated
selectionColor
along withselectionHandleColor
andcursorColor
out ofotherProps
. This modification inadvertently preventedselectionColor
from being passed to the iOS native component.This change ensures that the
selectionColor
prop is explicitly included in theRCTTextInputView
component's properties, fixing the regression.Note:
selectionHandleColor
andcursorColor
are Android-specific and do not require explicit passing on iOS.Changelog:
[IOS] [FIXED] - Fixed an issue where the
selectionColor
prop was not being applied on theTextInput
component.Test Plan:
Environment: iOS Simulator, React Native 0.74.0.
Steps to reproduce:
TextInput
component with theselectionColor
prop set.Expected Result: the selection color should match the color provided to the
selectionColor
prop.Actual result before fix: the selection color did not reflect the specified
selectionColor
prop and fell back to the default iOS selection color (blue).Screenshots: