From dd0a9d72605ba7a766ec4efccb8872ca8a728d8e Mon Sep 17 00:00:00 2001 From: Brent Vatne Date: Wed, 2 Dec 2020 20:33:36 -0800 Subject: [PATCH] [Fix] `Android`: font-family is not apply when secureTextEntry is true - Cherry-pick of https://github.com/facebook/react-native/pull/30164 --- .../com/facebook/react/views/textinput/ReactEditText.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java index 78a05c5e48d860..d1783a39f01c92 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -383,8 +383,6 @@ public String getReturnKeyType() { @Override public void setInputType(int type) { Typeface tf = super.getTypeface(); - // Input type password defaults to monospace font, so we need to re-apply the font - super.setTypeface(tf); int inputType = type; @@ -401,6 +399,8 @@ public void setInputType(int type) { super.setInputType(inputType); mStagedInputType = inputType; + // Input type password defaults to monospace font, so we need to re-apply the font + super.setTypeface(tf); /** * If set forces multiline on input, because of a restriction on Android source that enables