mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Return true if user has consumed the action (#4859)
Based on this: https://developer.android.com/reference/android/widget/TextView.OnEditorActionListener.html And assuming that the developer will run dismissSoftInput in the owner.dismissSoftInput() only if they need to. Returning False will close the keyboard regardless.
This commit is contained in:

committed by
Nikolay Tsonev

parent
d8caf5583c
commit
b0577728be
@ -113,11 +113,13 @@ function initializeEditTextListeners(): void {
|
||||
owner.dismissSoftInput();
|
||||
}
|
||||
owner._onReturnPress();
|
||||
return true;
|
||||
}
|
||||
|
||||
// If action is ACTION_NEXT then do not close keyboard
|
||||
if (actionId === android.view.inputmethod.EditorInfo.IME_ACTION_NEXT) {
|
||||
owner._onReturnPress();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -432,4 +434,4 @@ export abstract class EditableTextBase extends EditableTextBaseCommon {
|
||||
this.nativeViewProtected.setFilters(newFilters);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user