From f3ad49be674a6db04cece0b7784158b4f2df7ee7 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Tue, 26 Feb 2019 09:32:01 -0800 Subject: [PATCH] Fixed placeholder font not consistent with text's font when in multiline mode (#23654) Summary: Placeholder's font not consistent with text's font, it leads to cursor dislocation. We need to keep consistent between placeholder and text. [iOS] [Fixed] - Fixed placeholder font not consistent with text's font when in multiline mode Pull Request resolved: https://github.com/facebook/react-native/pull/23654 Differential Revision: D14226174 Pulled By: hramos fbshipit-source-id: 7cfb3b73d8799d22d5cbbfe557df8de3f5fcf034 --- Libraries/Text/TextInput/Multiline/RCTUITextView.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/Text/TextInput/Multiline/RCTUITextView.m b/Libraries/Text/TextInput/Multiline/RCTUITextView.m index fb1d9638de4..384b81a0178 100644 --- a/Libraries/Text/TextInput/Multiline/RCTUITextView.m +++ b/Libraries/Text/TextInput/Multiline/RCTUITextView.m @@ -98,6 +98,7 @@ static UIColor *defaultPlaceholderColor() } self.typingAttributes = reactTextAttributes.effectiveTextAttributes; _reactTextAttributes = reactTextAttributes; + _placeholderView.font = self.font ?: defaultPlaceholderFont(); } - (RCTTextAttributes *)reactTextAttributes