mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
dismissSoftInput fixed
This commit is contained in:
@ -84,12 +84,16 @@ export class EditableTextBase extends common.EditableTextBase {
|
|||||||
var editorActionListener = new android.widget.TextView.OnEditorActionListener({
|
var editorActionListener = new android.widget.TextView.OnEditorActionListener({
|
||||||
onEditorAction: function(textView: android.widget.TextView, actionId: number, event: android.view.KeyEvent): boolean {
|
onEditorAction: function(textView: android.widget.TextView, actionId: number, event: android.view.KeyEvent): boolean {
|
||||||
var owner = that.get();
|
var owner = that.get();
|
||||||
if (owner) {
|
if (owner) {
|
||||||
if (!event) {
|
if (actionId === android.view.inputmethod.EditorInfo.IME_ACTION_DONE ||
|
||||||
|
actionId === android.view.inputmethod.EditorInfo.IME_ACTION_GO ||
|
||||||
|
actionId === android.view.inputmethod.EditorInfo.IME_ACTION_SEARCH ||
|
||||||
|
actionId === android.view.inputmethod.EditorInfo.IME_ACTION_SEND ||
|
||||||
|
actionId === android.view.inputmethod.EditorInfo.IME_ACTION_NEXT) {
|
||||||
owner.dismissSoftInput();
|
owner.dismissSoftInput();
|
||||||
}
|
}
|
||||||
else if (event.getKeyCode() === android.view.KeyEvent.KEYCODE_ENTER) {
|
|
||||||
owner.dismissSoftInput();
|
if (event && event.getKeyCode() === android.view.KeyEvent.KEYCODE_ENTER) {
|
||||||
owner._onReturnPress();
|
owner._onReturnPress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user