Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.2.36-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-1424/folder/13177029/41237792/965872108
Email or phone of affected tester (no customers): ibellicotest+1942@gmail.com
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 / Android 12 (Hybrid app)
App Component: Money Requests
Action Performed:
- Open the Expensify app.
- Open any chat.
- Start manual expense creation flow.
- Add any amount and tap on "Next"
- Open any field to edit. (For example: Merchant)
- Open keyboard if it is not opened yet.
- With keyboard still opened, background and reopen app.
- Note that keyboard is closed, but empty space is displayed below "Save" button. (If this step does not reproduce on first try, repeat step 7 one more time)
- Tap on the arrow on the top left corner.
- Note that empty space is also visible on details page, below "Create" button.
- Tap on the back button on top left corner again, until returning to chat.
- Note that the same empty space is visible below composer.
- Tap on composer.
- Note that keyboard reappears and empty space disappears.
Expected Result:
After backgrounding and reopening app with keyboard opened during expense creation flow, keyboard should close and no empty space should be created on the bottom of the page.
Actual Result:
After backgrounding and reopening app with keyboard opened while editing expense fields during creation, an empty space remains displayed instead of keyboard. This empty space is also visible when returning to previous sections and chat.
Issue only stops reproducing after tapping on composer or text input, to reopen keyboard manually.
Test case #2
- Launch Expensify app
- Open any chat
- Tap emoji button
- App will not crash
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
- MacOS: Desktop
Screenshots/Videos
1.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021981128182593545913
- Upwork Job ID: 1981128182593545913
- Last Price Increase: 2025-11-05
- Automatic offers:
- dominictb | Reviewer | 109427136
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
melvin-bot commentedon Oct 22, 2025
Triggered auto assignment to @Christinadobrzyn (
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.dmkt9 commentedon Oct 22, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-11-01 04:11:09 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
After backgrounding and reopening app with keyboard opened while editing expense fields during creation, an empty space remains displayed instead of keyboard. This empty space is also visible when returning to previous sections and chat.
Issue only stops reproducing after tapping on composer or text input, to reopen keyboard manually.
What is the root cause of that problem?
The
MoneyRequestAmountInputcomponent has adisableKeyboardprop that defaults totrue. InMoneyRequestAmountForm, this prop isn’t explicitly passed toMoneyRequestAmountInput, so its value remainstrue:App/src/components/MoneyRequestAmountInput.tsx
Line 142 in 70eda4f
The
disableKeyboardprop is then passed down toTextInput:App/src/components/TextInput/index.native.tsx
Line 7 in 70eda4f
When
disableKeyboard === true, we callKeyboard.dismisswhen the app transitions to the background. However, since this happens after the app is already in the background, the components can’t update their height after the keyboard is dismissed.As a result, when the
TextInputis still focused in the following steps, this event still triggers becauseMoneyRequestAmountInputisn’t actually unmounted, andKeyboard.dismissis called — which causes the issue.What changes do you think we should make in order to solve the problem?
Only call
Keyboard.dismisswhen the input's page is currently focused.App/src/components/TextInput/index.native.tsx
Lines 10 to 26 in 70eda4f
What alternative solutions did you explore? (Optional)
N/A
2025-10-22.18-18-43.mp4
Christinadobrzyn commentedon Oct 22, 2025
I can reproduce this with the steps in the OP - adding External
melvin-bot commentedon Oct 22, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021981128182593545913
[-]Android - Expense - Empty space instead of keyboard if backgrounding app while creating expense[/-][+][$250] Android - Expense - Empty space instead of keyboard if backgrounding app while creating expense[/+]melvin-bot commentedon Oct 22, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dominictb (
External)Christinadobrzyn commentedon Oct 23, 2025
Hi @dominictb! Can you please review this proposal? TY
#73175 (comment)
huult commentedon Oct 24, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Empty space instead of keyboard if backgrounding app while creating expense
What is the root cause of that problem?
When we navigate to the Description or Merchant page,
shouldEnableMaxHeightis set totrue.App/src/pages/iou/request/step/StepScreenWrapper.tsx
Line 67 in eb2dbe6
When
shouldEnableMaxHeightistrue, the screen limits its height to the currentwindowHeight.App/src/components/ScreenWrapper/ScreenWrapperContainer.tsx
Line 117 in 7974e58
After backgrounding the app with the keyboard open and then reopening it, the
windowHeightvalue still reflects the reduced height caused by the (now closed) keyboard.As a result, the screen height remains too short, creating extra empty space below the buttons in the expense creation flow.
What changes do you think we should make in order to solve the problem?
To fix this issue, we should adjust the max height logic so it’s disabled right after returning from the background if the keyboard isn’t visible.
useEffect(() => { const appStateSubscription = AppState.addEventListener('change', (nextAppState) => { if (nextAppState !== 'active') { return; } // Mark that we returned from background, reset after brief delay setHasRecentlyReturnedFromBackground(true); setTimeout(() => setHasRecentlyReturnedFromBackground(false), 300); }); return () => { appStateSubscription.remove(); }; }, []); const shouldEnableMaxHeight = useCallback(() => { if (!canUseTouchScreen()) { return false; } if (hasRecentlyReturnedFromBackground && !Keyboard.isVisible()) { return false; } return true; }, [hasRecentlyReturnedFromBackground]);App/src/pages/iou/request/step/StepScreenWrapper.tsx
Line 67 in eb2dbe6
update to
shouldEnableMaxHeight={shouldEnableMaxHeight()}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.
48 remaining items
melvin-bot commentedon Dec 13, 2025
Triggered auto assignment to @stephanieelliott (
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.dominictb commentedon Dec 16, 2025
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: NA. This is an edge case.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
NA. This is an edge case.
stephanieelliott commentedon Dec 20, 2025
Payment Summary
Contributor: @dmkt9 due $250 via Upwork - offer extended, please accept it: https://www.upwork.com/nx/wm/offer/109875423 PAID
Contributor+: @dominictb paid $250 via Upwork PAID
dmkt9 commentedon Dec 20, 2025
@stephanieelliott Thank you. Payment requested.
Christinadobrzyn commentedon Dec 22, 2025
awesome! thanks for watching this @stephanieelliott!
@dominictb are you paid via Upwork or ND?
dominictb commentedon Dec 23, 2025
@Christinadobrzyn This should be paid via Upwork because it was assigned before my NewDot eligibility date. Please proceed with Upwork offer.
Christinadobrzyn commentedon Dec 23, 2025
Thanks @dominictb! Can you accept this offer? https://www.upwork.com/nx/wm/offer/109907169
dominictb commentedon Dec 24, 2025
Thanks @Christinadobrzyn I accepted the offer
Christinadobrzyn commentedon Dec 24, 2025
Awesome thanks @dominictb!
Closing as complete!