Skip to content

Remove TextInput cursor color changes with selectionColor prop changes #1792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Libraries/Text/TextInput/Multiline/RCTUITextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ - (void)setSelectionColor:(RCTUIColor *)selectionColor
NSMutableDictionary *selectTextAttributes = self.selectedTextAttributes.mutableCopy;
selectTextAttributes[NSBackgroundColorAttributeName] = selectionColor ?: [NSColor selectedControlColor];
self.selectedTextAttributes = selectTextAttributes.copy;
self.insertionPointColor = _cursorColor ?: self.selectionColor ?: [NSColor textColor];
}

- (RCTUIColor*)selectionColor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ function OnPaste(): React.Node {
</>
);
}
// [macOS]
// macOS]

exports.displayName = (undefined: ?string);
exports.title = 'TextInput';
Expand Down Expand Up @@ -608,6 +608,10 @@ exports.examples = ([
},
{
title: 'Colored highlight/cursor for text input',
// [macOS
description:
('Note: On macOS, the selectionColor prop does not change the cursor color.': string),
// macOS]
render: function (): React.Node {
return (
<View>
Expand Down Expand Up @@ -1158,4 +1162,4 @@ if (Platform.OS === 'macos') {
},
);
}
// [macOS]
// macOS]