Repository navigation
Create expense - Keyboard navigation is broken when user add a currency #104313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a260cad
a54b140
faa75fc
09075d5
843903a
eaec9d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| import CurrencySelectionList from '@components/CurrencySelectionList'; | ||
| import type {CurrencyListItem} from '@components/CurrencySelectionList/types'; | ||
| import type FocusTrapForModalProps from '@components/FocusTrap/FocusTrapForModal/FocusTrapForModalProps'; | ||
| import HeaderWithBackButton from '@components/HeaderWithBackButton'; | ||
| import Modal from '@components/Modal'; | ||
| import ScreenWrapper from '@components/ScreenWrapper'; | ||
|
|
@@ -25,9 +26,12 @@ type CurrencyPickerProps = { | |
| onInputChange?: (value: string, key?: string) => void; | ||
|
|
||
| excludeCurrencies?: string[]; | ||
|
|
||
| /** The button that opens the picker. When passed, focus returns to it after the picker closes. */ | ||
| launcherRef?: FocusTrapForModalProps['launcherRef']; | ||
| }; | ||
|
|
||
| function IOURequestStepCurrencyModal({isPickerVisible, hidePickerModal, headerText, value, excludeCurrencies, onInputChange = () => {}}: CurrencyPickerProps) { | ||
| function IOURequestStepCurrencyModal({isPickerVisible, hidePickerModal, headerText, value, excludeCurrencies, launcherRef, onInputChange = () => {}}: CurrencyPickerProps) { | ||
| const {translate} = useLocalize(); | ||
| const [recentlyUsedCurrencies] = useOnyx(ONYXKEYS.RECENTLY_USED_CURRENCIES); | ||
| const styles = useThemeStyles(); | ||
|
|
@@ -44,6 +48,8 @@ function IOURequestStepCurrencyModal({isPickerVisible, hidePickerModal, headerTe | |
| onClose={hidePickerModal} | ||
| onModalHide={hidePickerModal} | ||
| shouldEnableNewFocusManagement | ||
| shouldReturnFocus={!!launcherRef} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
🟢 The active element takes priority over Can you check this on Android and iOS mWeb and add videos ? Every platform section in the PR is empty except MacOS.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @thelullabyy 🟠 This thread got resolved without a reply, and the Android mWeb section in the PR is still empty. Can you add an Android mWeb video for the touch path: focus the amount input, tap the currency button, pick a currency?
👁️ Written by AI, reviewed by Kevin. |
||
| launcherRef={launcherRef} | ||
| onBackdropPress={Navigation.dismissModal} | ||
| shouldUseModalPaddingStyle={false} | ||
| shouldHandleNavigationBack | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.