Skip to content

Commit

Permalink
Merge pull request #55575 from Krishna2323/krishna2323/issue/55551
Browse files Browse the repository at this point in the history
fix: Unable to close currency list using device back button.
(cherry picked from commit f38cb04)

(CP triggered by Beamanator)
  • Loading branch information
Beamanator authored and OSBotify committed Jan 22, 2025
1 parent 5f8a934 commit 9231ceb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/CurrencyPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function CurrencyPicker({selectedCurrency, label = '', errorText = '', value, on
<Modal
type={CONST.MODAL.MODAL_TYPE.RIGHT_DOCKED}
isVisible={isPickerVisible}
onClose={() => hidePickerModal}
onClose={hidePickerModal}
onModalHide={hidePickerModal}
hideModalContentWhileAnimating
useNativeDriver
Expand Down
9 changes: 7 additions & 2 deletions src/pages/workspace/WorkspaceConfirmationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import ScreenWrapper from '@components/ScreenWrapper';
import ScrollView from '@components/ScrollView';
import Text from '@components/Text';
import TextInput from '@components/TextInput';
import useAutoFocusInput from '@hooks/useAutoFocusInput';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import {createWorkspaceWithPolicyDraftAndNavigateToIt} from '@libs/actions/App';
Expand All @@ -39,6 +40,7 @@ function getFirstAlphaNumericCharacter(str = '') {
function WorkspaceConfirmationPage() {
const styles = useThemeStyles();
const {translate} = useLocalize();
const {inputCallbackRef} = useAutoFocusInput();

const validate = useCallback(
(values: FormOnyxValues<typeof ONYXKEYS.FORMS.WORKSPACE_CONFIRMATION_FORM>) => {
Expand Down Expand Up @@ -110,7 +112,10 @@ function WorkspaceConfirmationPage() {
title={translate('workspace.new.confirmWorkspace')}
onBackButtonPress={() => Navigation.goBack()}
/>
<ScrollView contentContainerStyle={styles.flexGrow1}>
<ScrollView
contentContainerStyle={styles.flexGrow1}
keyboardShouldPersistTaps="always"
>
<View style={[styles.ph5, styles.pv3]}>
<Text style={[styles.mb3, styles.webViewStyles.baseFontStyle, styles.textSupporting]}>{translate('workspace.emptyWorkspace.subtitle')}</Text>
</View>
Expand Down Expand Up @@ -156,14 +161,14 @@ function WorkspaceConfirmationPage() {
label={translate('workspace.common.workspaceName')}
accessibilityLabel={translate('workspace.common.workspaceName')}
spellCheck={false}
autoFocus
defaultValue={defaultWorkspaceName}
onChangeText={(str) => {
if (getFirstAlphaNumericCharacter(str) === getFirstAlphaNumericCharacter(workspaceNameFirstCharacter)) {
return;
}
setWorkspaceNameFirstCharacter(str);
}}
ref={inputCallbackRef}
/>

<View style={[styles.mhn5, styles.mt4]}>
Expand Down

0 comments on commit 9231ceb

Please sign in to comment.