From 164f6b6afd7e0050d63134fcdc65ec6969ab03a0 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Fri, 12 Jan 2018 11:22:34 -0800 Subject: [PATCH] Unset phone and visible-password keyboardType flags on Android Summary: Attempted fix for issue #17248 Added unit tests that cover the affected function and manually repeated the reproduction steps found in the issue. Note: I had to apply the attached patch file to actually *run* the tests because they were not enabled. I didn't include this in the PR because it seemed like a secondary problem with possible ramifications (see comment near patched line) beyond this issue. For example, other, unrelated tests break when that line is uncommented. [textInputTestEnable.patch.txt](https://github.com/facebook/react-native/files/1565807/textInputTestEnable.patch.txt) If I should apply the patch to this PR or re-enable the tests in some other fashion, please let me know and I can do so. (none) [ANDROID] [BUGFIX] [TextInput] - Fix an issue when swapping to and from the `'visible-password'` or `'phone-pad'` keyboard types. Closes https://github.com/facebook/react-native/pull/17249 Differential Revision: D6713008 Pulled By: hramos fbshipit-source-id: 85eeb5398748d48e59d33eb86d851fd02d587a31 --- .../textinput/ReactTextInputManager.java | 11 ++++++-- .../textinput/ReactTextInputPropertyTest.java | 27 +++++++++++++++---- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java index 4879fbcc6614d2..b4904a9e3b172e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java @@ -73,6 +73,12 @@ public class ReactTextInputManager extends BaseViewManager