| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -115,12 +115,8 @@ function initializeEditTextListeners(): void { | |||
| 115 | 115 | return false; | |
| 116 | 116 | } | |
| 117 | 117 | ||
| 118 | - if (actionId === android.view.inputmethod.EditorInfo.IME_NULL || | ||
| 118 | + if (actionId === android.view.inputmethod.EditorInfo.IME_ACTION_DONE || | ||
| 119 | 119 | 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 || | ||
| 124 | 120 | (event && event.getKeyCode() === android.view.KeyEvent.KEYCODE_ENTER)) { | |
| 125 | 121 | // If it is TextField, close the keyboard. If it is TextView, do not close it since the TextView is multiline | |
| 126 | 122 | // https://github.com/NativeScript/NativeScript/issues/3111 | |
@@ -129,11 +125,9 @@ function initializeEditTextListeners(): void { | |||
| 129 | 125 | } | |
| 130 | 126 | ||
| 131 | 127 | 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 | ||
| 137 | 131 | owner._onReturnPress(); | |
| 138 | 132 | } | |
| 139 | 133 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments