Skip to content

Commit 5342cdf

Browse files
authored
Merge pull request #93158 from yusufdeveloper2903/fix/issue-92764-workspace-currency-enter
Fix/issue 92764 workspace currency enter
2 parents 8495e91 + a9330b1 commit 5342cdf

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/pages/WorkspaceCurrencySelectionPage.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import useOnyx from '@hooks/useOnyx';
1010
import useThemeStyles from '@hooks/useThemeStyles';
1111
import {setWorkspaceConfirmationCurrency} from '@libs/actions/Policy/Policy';
1212
import Navigation from '@libs/Navigation/Navigation';
13+
import {skipNextFocusRestore} from '@libs/NavigationFocusReturn';
1314
import CONST from '@src/CONST';
1415
import ONYXKEYS from '@src/ONYXKEYS';
1516
import type {Route} from '@src/ROUTES';
@@ -39,6 +40,10 @@ function WorkspaceCurrencySelectionPage({route}: WorkspaceCurrencySelectionPageP
3940
const onSelect = useCallback(
4041
(option: CurrencyListItem) => {
4142
setWorkspaceConfirmationCurrency(option.currencyCode);
43+
// After selecting, don't restore focus to the currency menu item on the confirmation page —
44+
// a focused button suppresses the form's submit-on-Enter, so the next Enter would re-open this
45+
// page instead of creating the workspace. The header Back button keeps the default focus restore.
46+
skipNextFocusRestore();
4247
goBack();
4348
},
4449
[goBack],

0 commit comments

Comments
 (0)