From 585e890b796652c8aa7bffc80f597d1e8541395c Mon Sep 17 00:00:00 2001 From: Yauheni Date: Thu, 19 Oct 2023 18:32:28 +0200 Subject: [PATCH] Revert changes --- src/components/TextInput/BaseTextInput.js | 2 -- src/libs/getReturnKeyType/index.android.ts | 16 ---------------- src/libs/getReturnKeyType/index.ts | 8 -------- src/libs/getReturnKeyType/types.ts | 3 --- .../Profile/Contacts/NewContactMethodPage.js | 2 +- src/pages/signin/LoginForm/BaseLoginForm.js | 2 +- 6 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 src/libs/getReturnKeyType/index.android.ts delete mode 100644 src/libs/getReturnKeyType/index.ts delete mode 100644 src/libs/getReturnKeyType/types.ts diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 65b8afd2fb1b..9bfdc79fad68 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -15,7 +15,6 @@ import * as StyleUtils from '../../styles/StyleUtils'; import variables from '../../styles/variables'; import Checkbox from '../Checkbox'; import getSecureEntryKeyboardType from '../../libs/getSecureEntryKeyboardType'; -import getReturnKeyType from '../../libs/getReturnKeyType'; import CONST from '../../CONST'; import FormHelpMessage from '../FormHelpMessage'; import isInputAutoFilled from '../../libs/isInputAutoFilled'; @@ -356,7 +355,6 @@ function BaseTextInput(props) { secureTextEntry={passwordHidden} onPressOut={props.onPress} showSoftInputOnFocus={!props.disableKeyboard} - returnKeyType={getReturnKeyType(props.returnKeyType, props.keyboardType)} keyboardType={getSecureEntryKeyboardType(props.keyboardType, props.secureTextEntry, passwordHidden)} value={props.value} selection={props.selection} diff --git a/src/libs/getReturnKeyType/index.android.ts b/src/libs/getReturnKeyType/index.android.ts deleted file mode 100644 index 29822d087a27..000000000000 --- a/src/libs/getReturnKeyType/index.android.ts +++ /dev/null @@ -1,16 +0,0 @@ -import CONST from '../../CONST'; -import GetReturnKeyType from './types'; - -/** - * Return returnKeyType passed as function parameter on Android - * Due to the fact that in the Android browser some keyboardTypes change the confirmation icon and ignore keyboardType, the ability to change the confirmation icon in the Android app to the one used in the browser has been added - */ -const getReturnKeyType: GetReturnKeyType = (returnKeyType, keyboardType) => { - if (keyboardType === CONST.KEYBOARD_TYPE.URL || keyboardType === CONST.KEYBOARD_TYPE.EMAIL_ADDRESS) { - return 'go'; - } - - return returnKeyType; -}; - -export default getReturnKeyType; diff --git a/src/libs/getReturnKeyType/index.ts b/src/libs/getReturnKeyType/index.ts deleted file mode 100644 index f08caef044a8..000000000000 --- a/src/libs/getReturnKeyType/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -import GetReturnKeyType from './types'; - -/** - * Return returnKeyType passed as function parameter on Web/Desktop/iOS - */ -const getReturnKeyType: GetReturnKeyType = (returnKeyType) => returnKeyType; - -export default getReturnKeyType; diff --git a/src/libs/getReturnKeyType/types.ts b/src/libs/getReturnKeyType/types.ts deleted file mode 100644 index 4fc780b143a6..000000000000 --- a/src/libs/getReturnKeyType/types.ts +++ /dev/null @@ -1,3 +0,0 @@ -type GetReturnKeyType = (returnKeyType: string, keyboardType: string) => string; - -export default GetReturnKeyType; diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js index cce43117d4f2..480c425a9094 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js @@ -122,7 +122,7 @@ function NewContactMethodPage(props) { ref={(el) => (loginInputRef.current = el)} inputID="phoneOrEmail" autoCapitalize="none" - returnKeyType="done" + returnKeyType="go" maxLength={CONST.LOGIN_CHARACTER_LIMIT} /> diff --git a/src/pages/signin/LoginForm/BaseLoginForm.js b/src/pages/signin/LoginForm/BaseLoginForm.js index 2ff0f2466762..8adedde6d546 100644 --- a/src/pages/signin/LoginForm/BaseLoginForm.js +++ b/src/pages/signin/LoginForm/BaseLoginForm.js @@ -213,7 +213,7 @@ function LoginForm(props) { accessibilityLabel={translate('loginForm.phoneOrEmail')} accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT} value={login} - returnKeyType="done" + returnKeyType="go" autoCompleteType="username" textContentType="username" nativeID="username"