mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
Do not dismiss keyboard on android, when text-field has return key type set to 'next' (#3239)
This commit is contained in:

committed by
Vladimir Enchev

parent
38d6484539
commit
fee1dd9a59
@ -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;
|
||||||
|
Reference in New Issue
Block a user