File tree Expand file tree Collapse file tree
tns-core-modules/ui/editable-text-base Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,12 +115,8 @@ function initializeEditTextListeners(): void {
115115 return false ;
116116 }
117117
118- if ( actionId === android . view . inputmethod . EditorInfo . IME_NULL ||
118+ if ( actionId === android . view . inputmethod . EditorInfo . IME_ACTION_DONE ||
119119 actionId === android . view . inputmethod . EditorInfo . IME_ACTION_UNSPECIFIED ||
120- actionId === android . view . inputmethod . EditorInfo . IME_ACTION_DONE ||
121- actionId === android . view . inputmethod . EditorInfo . IME_ACTION_GO ||
122- actionId === android . view . inputmethod . EditorInfo . IME_ACTION_SEARCH ||
123- actionId === android . view . inputmethod . EditorInfo . IME_ACTION_SEND ||
124120 ( event && event . getKeyCode ( ) === android . view . KeyEvent . KEYCODE_ENTER ) ) {
125121 // If it is TextField, close the keyboard. If it is TextView, do not close it since the TextView is multiline
126122 // https://github.com/NativeScript/NativeScript/issues/3111
@@ -129,11 +125,9 @@ function initializeEditTextListeners(): void {
129125 }
130126
131127 owner . _onReturnPress ( ) ;
132- }
133-
134- // If action is ACTION_NEXT then do not close keyboard
135- if ( actionId === android . view . inputmethod . EditorInfo . IME_ACTION_NEXT
136- || actionId === android . view . inputmethod . EditorInfo . IME_ACTION_PREVIOUS ) {
128+ } else if ( actionId === android . view . inputmethod . EditorInfo . IME_ACTION_NEXT ||
129+ actionId === android . view . inputmethod . EditorInfo . IME_ACTION_PREVIOUS ) {
130+ // do not close keyboard for ACTION_NEXT or ACTION_PREVIOUS
137131 owner . _onReturnPress ( ) ;
138132 }
139133
You can’t perform that action at this time.
0 commit comments