Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force original ime option when using multiline with blurOnSubmit in a…
Summary: …ndroid Android overrides the original set ime option when the EditText is a multiline one. This change makes sure to set it back to the original one when blurOnSubmit is true, which causes the button icon to be conforming to the set returnKeyType as well as changing the behaviour of the button, such that it will blurOnSubmit correctly. The reason not do it with blurOnSubmit being false is because it then would not create new lines when pressing the submit button, which would be inconsistent with IOS behaviour. **Note** this change relies on this one #11006 because the app would crash if we don't expllicitly remove the focus (`editText.clearFocus();`) Fixes #8778 **Test plan (required)** 1. Create view with TextInput with multiline and blurOnSubmit set to true ```javascript <View> <TextInput returnKeyType='search' blurOnSubmit={true} multiline={true} onSubmitEditing={event => console.log('submit search')}></TextInput> </View> ``` 2. Input some text and click submit button in soft keyboard 3. See submit event fired and focus cleared / keyboard removed Closes #11125 Differential Revision: D5718755 Pulled By: hramos fbshipit-source-id: c403d61a8a879c04c3defb40ad0b6689a2329ce1
- Loading branch information