Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix keyboard staying as email when switching between default and email (
#33924) Summary: Right now, when we change the keyboardType on android between between default and email, the value keyboard type stays as email (specially noticeable with the key next to the spacebar, that changes between the comma (`,`) to the at sign (`@`)). This is because the mask we are using when updating the input is only taking into account the class, and not the flags nor the variations. We don't apply all masks because it may interfere with flags assigned by other props, like multiline or secure text entry. Therefore, we have created our own mask, taking into account all the variations and flags that the keyboardType prop may set. This may be hard to maintain, since whenever we add any other keyboard type, we have to take these flags into mind. The error I was trying to fix was in particular regarding going back and forward from email, but this fix may solve other similar issues with other keyboard styles. ## Changelog [Android] [Fixed] - Fix a bug where the keyboard, once set as email, won't change back to default. Pull Request resolved: #33924 Test Plan: In order to test this PR, any test code with a TextInput, and a way to change the value of the keyboardType should work. We should be able to see how the keyboard changes to the correct type without staying, for example, on the email state. Reviewed By: lunaleaps Differential Revision: D36784563 Pulled By: makovkastar fbshipit-source-id: 74d7b61b3c07feea4e4050d7a07603a68b98e835
- Loading branch information