Skip to content

Commit dd0a9d7

Browse files
committed
[Fix] Android: font-family is not apply when secureTextEntry is true
- Cherry-pick of facebook#30164
1 parent 20741de commit dd0a9d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,6 @@ public String getReturnKeyType() {
383383
@Override
384384
public void setInputType(int type) {
385385
Typeface tf = super.getTypeface();
386-
// Input type password defaults to monospace font, so we need to re-apply the font
387-
super.setTypeface(tf);
388386

389387
int inputType = type;
390388

@@ -401,6 +399,8 @@ public void setInputType(int type) {
401399

402400
super.setInputType(inputType);
403401
mStagedInputType = inputType;
402+
// Input type password defaults to monospace font, so we need to re-apply the font
403+
super.setTypeface(tf);
404404

405405
/**
406406
* If set forces multiline on input, because of a restriction on Android source that enables

0 commit comments

Comments
 (0)