File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ - (instancetype)init
3131 _textShadowRadius = NAN;
3232 _opacity = NAN;
3333 _textTransform = RCTTextTransformUndefined;
34+ #if TARGET_OS_OSX // TODO(macOS ISS#2323203)
35+ _foregroundColor = [NSColor labelColor ];
36+ #endif // TODO(macOS ISS#2323203)
3437 }
3538
3639 return self;
Original file line number Diff line number Diff line change @@ -30,8 +30,7 @@ @implementation RCTUITextView
3030
3131static RCTUIColor *defaultPlaceholderColor () // TODO(OSS Candidate ISS#2710739)
3232{
33- // Default placeholder color from UITextField.
34- return [RCTUIColor colorWithRed: 0 green: 0 blue: 0.0980392 alpha: 0.22 ]; // TODO(OSS Candidate ISS#2710739)
33+ return [RCTUIColor placeholderTextColor ]; // TODO(OSS Candidate ISS#2710739)
3534}
3635
3736- (instancetype )initWithFrame : (CGRect)frame
@@ -227,7 +226,7 @@ - (void)setAttributedText:(NSAttributedString *)attributedText
227226 [self .textStorage setAttributedString: [NSAttributedString new ]];
228227 }
229228 } else {
230- // But if the text is preserved, we just copying the attributes from the source string.
229+ // But if the text is preserved, we just copy the attributes from the source string.
231230 if (![self .textStorage isEqualToAttributedString: attributedText]) {
232231 [self copyTextAttributesFrom: attributedText];
233232 }
Original file line number Diff line number Diff line change @@ -320,7 +320,11 @@ - (void)setSecureTextEntry:(BOOL)secureTextEntry
320320 if (self.placeholderColor ) {
321321 [textAttributes setValue: self .placeholderColor forKey: NSForegroundColorAttributeName ];
322322 } else {
323+ #if TARGET_OS_OSX // [TODO(macOS ISS#2323203)
324+ [textAttributes setValue: defaultPlaceholderTextColor () forKey: NSForegroundColorAttributeName ];
325+ #else
323326 [textAttributes removeObjectForKey: NSForegroundColorAttributeName ];
327+ #endif // ]TODO(macOS ISS#2323203)
324328 }
325329
326330 return textAttributes;
You can’t perform that action at this time.
0 commit comments