Do not dismiss keyboard on android, when text-field has return key type set to 'next' (#3239)

This commit is contained in:
pgrzeszczak
2016-12-05 13:07:00 +01:00
committed by Vladimir Enchev
parent 38d6484539
commit fee1dd9a59

View File

@ -105,7 +105,6 @@ export class EditableTextBase extends common.EditableTextBase {
actionId === android.view.inputmethod.EditorInfo.IME_ACTION_GO || actionId === android.view.inputmethod.EditorInfo.IME_ACTION_GO ||
actionId === android.view.inputmethod.EditorInfo.IME_ACTION_SEARCH || actionId === android.view.inputmethod.EditorInfo.IME_ACTION_SEARCH ||
actionId === android.view.inputmethod.EditorInfo.IME_ACTION_SEND || actionId === android.view.inputmethod.EditorInfo.IME_ACTION_SEND ||
actionId === android.view.inputmethod.EditorInfo.IME_ACTION_NEXT ||
(event && event.getKeyCode() === android.view.KeyEvent.KEYCODE_ENTER)) { (event && event.getKeyCode() === android.view.KeyEvent.KEYCODE_ENTER)) {
// If it is TextField, close the keyboard. If it is TextView, do not close it since the TextView is multiline // If it is TextField, close the keyboard. If it is TextView, do not close it since the TextView is multiline
@ -115,6 +114,10 @@ export class EditableTextBase extends common.EditableTextBase {
} }
owner._onReturnPress(); owner._onReturnPress();
} }
// If action is ACTION_NEXT then do not close keyboard
if (actionId === android.view.inputmethod.EditorInfo.IME_ACTION_NEXT) {
owner._onReturnPress();
}
} }
return false; return false;