Skip to content

Commit da30fa2

Browse files
lyahdavchristophpurrer
authored andcommitted
Remove TextInput setting insertionPointColor
We should not be setting the insertionPointColor by default. Let the OS do its thing. Later we can consider exposing a prop for this but the default should be to not set it.
1 parent 2bcaeb1 commit da30fa2

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Libraries/Text/TextInput/Multiline/RCTUITextView.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ - (instancetype)initWithFrame:(CGRect)frame
4646
_placeholderView.numberOfLines = 0;
4747
[self addSubview:_placeholderView];
4848
#else // [TODO(macOS GH#774)
49-
self.insertionPointColor = [NSColor selectedControlColor];
5049
// Fix blurry text on non-retina displays.
5150
self.canDrawSubviewsIntoLayer = YES;
5251
self.allowsUndo = YES;
@@ -131,7 +130,7 @@ - (void)setSelectionColor:(RCTUIColor *)selectionColor
131130
NSMutableDictionary *selectTextAttributes = self.selectedTextAttributes.mutableCopy;
132131
selectTextAttributes[NSBackgroundColorAttributeName] = selectionColor ?: [NSColor selectedControlColor];
133132
self.selectedTextAttributes = selectTextAttributes.copy;
134-
self.insertionPointColor = self.selectionColor ?: [NSColor selectedControlColor];
133+
self.insertionPointColor = self.selectionColor ?: [NSColor textColor];
135134
}
136135

137136
- (RCTUIColor*)selectionColor

Libraries/Text/TextInput/Singleline/RCTUITextField.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ - (NSText *)setUpFieldEditorAttributes:(NSText *)textObj
7777
NSMutableDictionary *selectTextAttributes = fieldEditor.selectedTextAttributes.mutableCopy;
7878
selectTextAttributes[NSBackgroundColorAttributeName] = self.selectionColor ?: [NSColor selectedControlColor];
7979
fieldEditor.selectedTextAttributes = selectTextAttributes;
80-
fieldEditor.insertionPointColor = self.selectionColor ?: [RCTUIColor selectedControlColor];
8180
return fieldEditor;
8281
}
8382

0 commit comments

Comments
 (0)