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