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:
Evan Payne
2017-09-25 14:46:01 +02:00
committed by Nikolay Tsonev
parent d8caf5583c
commit b0577728be

View File

@ -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;