You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version Number: 9.2.89-1 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#78004 Email or phone of affected tester (no customers):isjdsoijsojnsiojisndj@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Samsung Galaxy S25 FE / Android 16 App Component: Money Requests
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Please re-state the problem that we are trying to solve in this issue.
On Android devices, the keyboard behaves erratically (flashes or blinks) when returning to the Amount entry step after selecting a currency during Expense creation. This disrupts the user experience, creates visual noise, and makes the app feel unpolished.
What is the root cause of that problem?
The current implementation uses a setTimeout with a fixed delay (CONST.ANIMATED_TRANSITION + 100) to restore focus to the input after the currency picker modal closes.
Timing Mismatch: The fixed delay does not reliably match the completion of the modal closing animation or the Android keyboard’s dismissal animation.
Race Conditions: If the modal closes faster or slower than expected, or if the keyboard dismissal overlaps with the focus request, the system conflicts between hiding and showing the keyboard, causing the flash.
What changes do you think we should make in order to solve the problem?
We will decouple focus restoration from fixed delays and instead use event-driven coordination:
Modify IOURequestStepCurrencyModal:
Update CurrencyPickerProps to accept an onModalHide (or onDismiss) callback.
Pass this callback to the underlying Modal component’s onModalHide prop to ensure code runs only after the modal is fully removed from the screen.
Update IOURequestStepAmount:
Remove the existing setTimeout and isCurrencyPickerVisible dependency in useFocusEffect.
Define a stable onCurrencyModalHide callback.
Inside the callback:
Check Keyboard State: Optionally verify if any keyboard dismissal is pending.
InteractionManager: Wrap the focus() call in InteractionManager.runAfterInteractions() to ensure no other JS animations interfere.
Execute Focus: Call textInput.current.focus().
Optional Animation Refinement:
Ensure the modal’s transition does not conflict with the keyboard (e.g., fade vs. slide). The default RIGHT_DOCKED is acceptable; focus is on timing rather than changing animation style.
What alternative solutions did you explore? (Optional)
Increasing the fixed setTimeout delay, which is unreliable across devices and animations.
Using requestAnimationFrame loops, which is less predictable and can introduce jank.
The chosen event-driven approach ensures reliable, animation-synced focus restoration without hard-coded timing.
🚨 Edited by proposal-police: This proposal was edited at 2026-01-01 05:25:58 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue
On Android devices, when a user selects a currency during expense creation, the keyboard briefly blinks/flashes. This creates a jarring visual experience where the keyboard appears to dismiss and immediately reappear during the screen transition.
What is the root cause of that problem?
After analyzing the current codebase, I found the issue occurs in the currency selection flow between two screens: IOURequestStepAmount.tsx (the amount entry screen) and IOURequestStepCurrency.tsx (the currency picker screen).
The flow works as follows:
User taps currency on the amount screen
Navigates to IOURequestStepCurrency screen via navigateToCurrencySelectionPage()
User selects a currency, triggering confirmCurrencySelection()
Screen navigates back to amount page
The root cause is in src/pages/iou/request/step/IOURequestStepCurrency.tsx at line 51-58. The confirmCurrencySelection function calls Keyboard.dismiss() but doesn't wait for the Promise to resolve before initiating navigation:
constconfirmCurrencySelection=(option: CurrencyListItem)=>{Keyboard.dismiss();// Promise returned but not awaitedif(pageIndex!==CONST.IOU.PAGE_INDEX.CONFIRM){setMoneyRequestCurrency(transactionID,option.currencyCode,action===CONST.IOU.ACTION.EDIT);}Navigation.setNavigationActionToMicrotaskQueue(()=>navigateBack(option.currencyCode));};
This creates a race condition. While the keyboard is still in the process of dismissing, navigation back to the amount screen begins. When IOURequestStepAmount.tsx regains focus, its useFocusEffect hook (lines 140-149) automatically focuses the text input after CONST.ANIMATED_TRANSITION milliseconds. This focus happens while the previous keyboard dismissal is still in progress, causing both animations to overlap visually.
The issue is specifically about asynchronous operation timing, not about modal vs screen architecture or requiring event-driven callbacks.
What changes do you think we should make in order to solve the problem?
The fix needs to be applied in src/pages/iou/request/step/IOURequestStepCurrency.tsx in the confirmCurrencySelection function. We need to ensure the keyboard dismissal completes before proceeding with state updates and navigation.
By chaining the operations after the Promise resolution, we guarantee that:
The keyboard animation completes fully before navigation begins
The screen transition happens with a clean slate
When the amount input regains focus, the keyboard shows smoothly without conflicting with any ongoing dismissal animation
This is a focused change that requires no modifications to other files, no new props or callbacks, and maintains the existing architecture. The fix addresses the asynchronous timing issue directly at its source.
What alternative solutions did you explore?
I verified the current codebase to ensure the fix targets the correct location. The currency selection is implemented as a full screen navigation (using StepScreenWrapper), not a modal component. This means solutions involving modal lifecycle callbacks like onModalHide would not apply to the current implementation.
I also considered modifying the auto-focus behavior in IOURequestStepAmount.tsx to add a longer delay or conditional logic when returning from currency selection. However, this would introduce coupling between the two screens and wouldn't solve the underlying timing issue - it would only make it less visible. The proper approach is to fix the sequencing where the problem originates.
Adding a fixed timeout instead of using the Promise would also work in most cases, but it would be fragile and device-dependent. Different Android devices have different keyboard animation speeds, so a hardcoded delay might be too short for some devices and unnecessarily long for others. Using the Promise ensures we wait exactly as long as needed on any device.
The proposed solution is the most direct and maintainable approach - it fixes the race condition at its source with minimal code change and no architectural modifications.
⚠️@ChinmayKarnik Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
⚠️@ChinmayKarnik Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
I've updated my proposal after verifying the actual code in the current codebase. The issue is in IOURequestStepCurrency.tsx (line 51-58) in the confirmCurrencySelection function, where Keyboard.dismiss() is called without awaiting its Promise before navigation. This differs from other proposals which reference different code paths or architectural patterns that don't exist in the current implementation.
we should wait for the keyboard to fully close before setting isTransitioning to false, So the React Native modal content remains available while the keyboard close animation is still in progress.
to account for the keyboard close animation as well. We increase the additional timer from 100 to 200.
Result in money request step: moneyrequest.mp4Result global chat search: globalsearch.mp4
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Okay, got it. I tried with API 36.0 and can reproduce the issue consistently. However, on API 36.1, I can't reproduce this issue. I think this is an Android bug and because Android 16 introduces predictive back gesture, so that might be causing the issue in initial release of Android 16. I think it's still in beta and will be resolved in the final version of Android 16.
So, does it still make sense to find solutions for this issue, @tgolen? If yes, the solution should be for react-native library.
I also saw that a log message, which was appearing as an error on Android API 16.0, is shown as a warning on API 16.1
Thanks for investigating it. It sounds to me like it's not valuable to work on a fix at this time. I'll go ahead and close this. If it can be reproduced in more versions, then we should probably take a look.
Activity
melvin-bot commentedon Dec 30, 2025
You have been assigned to this deploy blocker because you recently merged this PR: #78004
melvin-bot commentedon Dec 30, 2025
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Dec 30, 2025
Triggered auto assignment to @jliexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.github-actions commentedon Dec 30, 2025
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
10 remaining items
yatin-italy commentedon Dec 30, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
On Android devices, the keyboard behaves erratically (flashes or blinks) when returning to the Amount entry step after selecting a currency during Expense creation. This disrupts the user experience, creates visual noise, and makes the app feel unpolished.
What is the root cause of that problem?
The current implementation uses a
setTimeoutwith a fixed delay (CONST.ANIMATED_TRANSITION + 100) to restore focus to the input after the currency picker modal closes.What changes do you think we should make in order to solve the problem?
We will decouple focus restoration from fixed delays and instead use event-driven coordination:
Modify
IOURequestStepCurrencyModal:CurrencyPickerPropsto accept anonModalHide(oronDismiss) callback.Modalcomponent’sonModalHideprop to ensure code runs only after the modal is fully removed from the screen.Update
IOURequestStepAmount:Remove the existing
setTimeoutandisCurrencyPickerVisibledependency inuseFocusEffect.Define a stable
onCurrencyModalHidecallback.Inside the callback:
focus()call inInteractionManager.runAfterInteractions()to ensure no other JS animations interfere.textInput.current.focus().Optional Animation Refinement:
What alternative solutions did you explore? (Optional)
setTimeoutdelay, which is unreliable across devices and animations.requestAnimationFrameloops, which is less predictable and can introduce jank.ChinmayKarnik commentedon Jan 1, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-01-01 05:25:58 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue
On Android devices, when a user selects a currency during expense creation, the keyboard briefly blinks/flashes. This creates a jarring visual experience where the keyboard appears to dismiss and immediately reappear during the screen transition.
What is the root cause of that problem?
After analyzing the current codebase, I found the issue occurs in the currency selection flow between two screens:
IOURequestStepAmount.tsx(the amount entry screen) andIOURequestStepCurrency.tsx(the currency picker screen).The flow works as follows:
IOURequestStepCurrencyscreen vianavigateToCurrencySelectionPage()confirmCurrencySelection()The root cause is in
src/pages/iou/request/step/IOURequestStepCurrency.tsxat line 51-58. TheconfirmCurrencySelectionfunction callsKeyboard.dismiss()but doesn't wait for the Promise to resolve before initiating navigation:This creates a race condition. While the keyboard is still in the process of dismissing, navigation back to the amount screen begins. When
IOURequestStepAmount.tsxregains focus, itsuseFocusEffecthook (lines 140-149) automatically focuses the text input afterCONST.ANIMATED_TRANSITIONmilliseconds. This focus happens while the previous keyboard dismissal is still in progress, causing both animations to overlap visually.The issue is specifically about asynchronous operation timing, not about modal vs screen architecture or requiring event-driven callbacks.
What changes do you think we should make in order to solve the problem?
The fix needs to be applied in
src/pages/iou/request/step/IOURequestStepCurrency.tsxin theconfirmCurrencySelectionfunction. We need to ensure the keyboard dismissal completes before proceeding with state updates and navigation.Current implementation (lines 51-58):
Proposed fix:
By chaining the operations after the Promise resolution, we guarantee that:
This is a focused change that requires no modifications to other files, no new props or callbacks, and maintains the existing architecture. The fix addresses the asynchronous timing issue directly at its source.
What alternative solutions did you explore?
I verified the current codebase to ensure the fix targets the correct location. The currency selection is implemented as a full screen navigation (using
StepScreenWrapper), not a modal component. This means solutions involving modal lifecycle callbacks likeonModalHidewould not apply to the current implementation.I also considered modifying the auto-focus behavior in
IOURequestStepAmount.tsxto add a longer delay or conditional logic when returning from currency selection. However, this would introduce coupling between the two screens and wouldn't solve the underlying timing issue - it would only make it less visible. The proper approach is to fix the sequencing where the problem originates.Adding a fixed timeout instead of using the Promise would also work in most cases, but it would be fragile and device-dependent. Different Android devices have different keyboard animation speeds, so a hardcoded delay might be too short for some devices and unnecessarily long for others. Using the Promise ensures we wait exactly as long as needed on any device.
The proposed solution is the most direct and maintainable approach - it fixes the race condition at its source with minimal code change and no architectural modifications.
github-actions commentedon Jan 1, 2026
ChinmayKarnik commentedon Jan 1, 2026
I've updated my proposal after verifying the actual code in the current codebase. The issue is in
IOURequestStepCurrency.tsx(line 51-58) in theconfirmCurrencySelectionfunction, whereKeyboard.dismiss()is called without awaiting its Promise before navigation. This differs from other proposals which reference different code paths or architectural patterns that don't exist in the current implementation.rohit9625 commentedon Jan 1, 2026
Was anyone able to reproduce this issue consistenly or not because I think a recently merged PR fixed this issue?
tsa321 commentedon Jan 2, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When user close RHP modal when keyboard is opened, the Keyboard blinks briefly
What is the root cause of that problem?
The issue is not limited to the currency selection page; it also occurs in the global chat search:
Chat search bug:
test_d.mp4
The root cause is because:
App/src/components/Modal/ReanimatedModal/index.tsx
Line 218 in 66de3d6
The modal (React Native
Modal) is closed too early while the keyboard close animation is still running.this is because:
App/src/components/Modal/ReanimatedModal/index.tsx
Line 148 in 66de3d6
we set the transition as ended/finished without considering the keyboard animation.
What changes do you think we should make in order to solve the problem?
When closing the modal / set visible to false:
App/src/components/Modal/ReanimatedModal/index.tsx
Line 218 in 634b5ce
we should wait for the keyboard to fully close before setting
isTransitioningtofalse, So the React Native modal content remains available while the keyboard close animation is still in progress.We could modify this code:
App/src/components/Modal/ReanimatedModal/index.tsx
Line 148 in 66de3d6
to be:
This will fix the global chat search keyboard blinking issue.
On the money request step amount page, the native keyboard appears, so we need to adjust this timer:
App/src/pages/iou/request/step/IOURequestStepAmount.tsx
Line 132 in 634b5ce
to account for the keyboard close animation as well. We increase the additional timer from 100 to 200.
Result in money request step:
moneyrequest.mp4
Result global chat search:
globalsearch.mp4
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
tsa321 commentedon Jan 2, 2026
Still reproducible for me on latest main:
test:
test_d.mp4
rohit9625 commentedon Jan 2, 2026
What is the emulator and Android version on which you can reproduce this issue, @tsa321?
tsa321 commentedon Jan 2, 2026
@rohit9625 using pixel 9 android 16, api 36
rohit9625 commentedon Jan 2, 2026
Okay, got it. I tried with API 36.0 and can reproduce the issue consistently. However, on API 36.1, I can't reproduce this issue. I think this is an Android bug and because Android 16 introduces predictive back gesture, so that might be causing the issue in initial release of Android 16. I think it's still in beta and will be resolved in the final version of Android 16.
So, does it still make sense to find solutions for this issue, @tgolen? If yes, the solution should be for react-native library.
I also saw that a log message, which was appearing as an error on Android API 16.0, is shown as a warning on API 16.1
tgolen commentedon Jan 2, 2026
Thanks for investigating it. It sounds to me like it's not valuable to work on a fix at this time. I'll go ahead and close this. If it can be reproduced in more versions, then we should probably take a look.