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
{{ message }}
Repository navigation
[Due for payment 2026-01-07 (PAID)] [$250] Workspace - Keypad appears briefly on tapping back button to go back to Add field pg #67945
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: 9.1.89-4 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: Exploratory around #67191 Email or phone of affected tester (no customers):applausetester+ck482025@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Pixel 8a/Android 15 App Component: Workspace Settings
Action Performed:
Launch Hybrid app on Android device
Go to Workspace settings >> Reports (upgrade to control if not done before)
Tap on Add Field >> Click on Name field
Do not enter any text, tap on back button to go back to add field page (Note: Keypad appears briefly when navigating back)
Tap on type field >> select Text type
Click Initial value field
Do not enter any text, tap on back button to go back to add field page (Note: Keypad appears briefly when navigating back)
Expected Result:
Keypad should not appear briefly at the bottom when tapping on back button to navigate back to add field page
Actual Result:
Keypad appears briefly on tapping back button to go back to Add field page
changed the title [-]Workspace - Keypad appears briefly on tapping back button to go back to Add field pg[/-][+][$250] Workspace - Keypad appears briefly on tapping back button to go back to Add field pg[/+]on Aug 8, 2025
In ReanimatedModal we have similar logic ReactNativeModal (react-native-modal library) but with a difference, in which we use Animated from react-native-reanimated to create containerView:
On Android, TextInput does not lose focus immediately when we click on another component like on the web (to lose focus we have to handle the event when clicking on another area and call blur for TextInput), so blur processing will be slower than web.
Android does not have time to handle focus cancellation
When TextInput is in focus and the component is suddenly unmounted (for example when Modal is closed), Android still keeps the keyboard open. But because the view has disappeared, it has no point to "anchor" the keyboard → the keyboard is closed immediately.
Reanimated Modal can delay unmounting or layout processing during animation. This makes Android "think" that the keyboard needs to open, then immediately realize that there is no view → the keyboard is closed.
Note: If you set the log on TextInput's onBlur, you can see that this event is not triggered on Android.
What changes do you think we should make in order to solve the problem?
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
NA
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.
@TaduJRthe new proposal is quite big so I need more time to review it. But I wanted to let you know that since the approach is different from the original one, it might not count as a follow-up and could be a separate issue (which needs to go through triage and we might not be hired). Please check if the problem is actually that complicated or if it's over-engineered.
@TaduJR#67945 (comment) is quite big so I need more time to review it. But I wanted to let you know that since the approach is different from #67945 (comment), it might not count as a follow-up and could be a separate issue (which needs to go through triage and we might not be hired). Please check if the problem is actually that complicated or if it's over-engineered.
@QichenZhu As stated on the alternative solution on the proposal we could do target fix like this one which is relatively very easy, but I chose to make a fix that target all these kinds of issue for future and that address from the deepest root cause that why it got long. Please feel free to take your time for feedback.
changed the title [-][Due for payment 2026-01-07] [$250] Workspace - Keypad appears briefly on tapping back button to go back to Add field pg[/-][+][Due for payment 2026-01-07 (PAID)] [$250] Workspace - Keypad appears briefly on tapping back button to go back to Add field pg[/+]on Jan 14, 2026
@TaduJR I'm not keen on the main solution since the issue can happen when the user doesn't click the back button in the header, but an item in the list (see video below). I prefer fixing it in SearchRouterContext instead. cc @francoisl
Does the problem still happen now? I can't reproduce the original issue, nor see the keyboard flash when I close the Search on my Android device.
This issue is getting long and hard to parse, and references code that has now changed a bunch – maybe it would be best to close this as resolved and open a separate issue if there's still something to address.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Aug 5, 2025
Triggered auto assignment to @RachCHopkins (
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.Krishna2323 commentedon Aug 5, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace - Keypad appears briefly on tapping back button to go back to Add field pg
What is the root cause of that problem?
App/src/components/TextPicker/index.tsx
Lines 24 to 26 in f2851aa
What changes do you think we should make in order to solve the problem?
Keyboard.dismiss.Keyboard.dismissinTextSelectorModal.App/src/components/TextPicker/TextSelectorModal.tsx
Lines 46 to 51 in b1f9003
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
Result
RachCHopkins commentedon Aug 8, 2025
Ok that's really weird and I'm not on that version so I can't repro. Will have to take your word for it!
[-]Workspace - Keypad appears briefly on tapping back button to go back to Add field pg[/-][+][$250] Workspace - Keypad appears briefly on tapping back button to go back to Add field pg[/+]melvin-bot commentedon Aug 8, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021953701030105266250
melvin-bot commentedon Aug 8, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (
External)dmkt9 commentedon Aug 10, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Keypad appears briefly on tapping back button to go back to Add field page
What is the root cause of that problem?
Since here we use
shouldUseReanimatedModalfor Modal:App/src/components/TextPicker/TextSelectorModal.tsx
Line 124 in dd11c95
So
ModalComponentwill useReanimatedModalinstead ofReactNativeModal:App/src/components/Modal/BaseModal.tsx
Lines 61 to 63 in dd11c95
In
ReanimatedModalwe have similar logicReactNativeModal(react-native-modallibrary) but with a difference, in which we useAnimatedfromreact-native-reanimatedto createcontainerView:App/src/components/Modal/ReanimatedModal/index.tsx
Lines 146 to 147 in dd11c95
App/src/components/Modal/ReanimatedModal/Container/index.tsx
Lines 58 to 62 in dd11c95
On Android,
TextInputdoes not lose focus immediately when we click on another component like on the web (to lose focus we have to handle the event when clicking on another area and call blur forTextInput), so blur processing will be slower than web.Android does not have time to handle focus cancellation
When
TextInputis in focus and the component is suddenly unmounted (for example when Modal is closed), Android still keeps the keyboard open. But because the view has disappeared, it has no point to "anchor" the keyboard → the keyboard is closed immediately.Reanimated Modal can delay unmounting or layout processing during animation. This makes Android "think" that the keyboard needs to open, then immediately realize that there is no view → the keyboard is closed.
Note: If you set the log on
TextInput's onBlur, you can see that this event is not triggered on Android.What changes do you think we should make in order to solve the problem?
There are a few options:
Option 1: Remove
shouldUseReanimatedModal:App/src/components/TextPicker/TextSelectorModal.tsx
Line 124 in dd11c95
Option 2: Use
setTimeoutwith appropriate time here to give the system time to process the blur event and for the keyboard:App/src/components/Modal/ReanimatedModal/index.tsx
Line 115 in dd11c95
Example:
KeyboardUtils.dissmis()here, ensuring the keyboard is closed completely and also allowing time for the system to handle the blur event:App/src/components/Modal/ReanimatedModal/index.tsx
Line 115 in dd11c95
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
NA
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.
Result:
Option 2:
Screencast.from.2025-08-10.21-26-33.webm
Option 3:
Screencast.from.2025-08-10.21-27-14.webm
202 remaining items
RachCHopkins commentedon Jan 13, 2026
I would normally close this at this point, but are we adding an additional proposal/PR here?
QichenZhu commentedon Jan 13, 2026
@TaduJR the new proposal is quite big so I need more time to review it. But I wanted to let you know that since the approach is different from the original one, it might not count as a follow-up and could be a separate issue (which needs to go through triage and we might not be hired). Please check if the problem is actually that complicated or if it's over-engineered.
TaduJR commentedon Jan 13, 2026
@QichenZhu As stated on the alternative solution on the proposal we could do target fix like this one which is relatively very easy, but I chose to make a fix that target all these kinds of issue for future and that address from the deepest root cause that why it got long. Please feel free to take your time for feedback.
[-][Due for payment 2026-01-07] [$250] Workspace - Keypad appears briefly on tapping back button to go back to Add field pg[/-][+][Due for payment 2026-01-07 (PAID)] [$250] Workspace - Keypad appears briefly on tapping back button to go back to Add field pg[/+]melvin-bot commentedon Jan 16, 2026
@QichenZhu Whoops! This issue is 2 days overdue. Let's get this updated quick!
QichenZhu commentedon Jan 19, 2026
@TaduJR I'm not keen on the main solution since the issue can happen when the user doesn't click the back button in the header, but an item in the list (see video below). I prefer fixing it in
SearchRouterContextinstead. cc @francoisl67945b.mov
TaduJR commentedon Feb 4, 2026
Hi @francoisl
I didn't notice your reaction, because there wasn't a notification.
So should I go ahead an create PR using the alternative solution? Just double checking that you agreed with it.
francoisl commentedon Feb 9, 2026
Does the problem still happen now? I can't reproduce the original issue, nor see the keyboard flash when I close the Search on my Android device.
This issue is getting long and hard to parse, and references code that has now changed a bunch – maybe it would be best to close this as resolved and open a separate issue if there's still something to address.
TaduJR commentedon Feb 9, 2026
Yea just checked, No longer repo @francoisl
Let's close this.