Skip to content

Android - Expense - Cursor does not auto appear on amount input page in landscape mode #87314

Closed

Description

@jponikarchuk

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.3.54-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #85229
Email or phone of affected tester (no customers): jsdjosidjiojisojio3@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

Action Performed:

  1. Launch Expensify app in landscape mode.
  2. Open FAB > Create expense > Manual.

Expected Result:

Cursor will auto appear on amount input page in landscape mode.

Actual Result:

Cursor does not auto appear on amount input page in landscape mode.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Video.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @GCyganek

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 8, 2026
  2. melvin-bot commented on Apr 8, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #85229

  3. melvin-bot commented on Apr 8, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. github-actions commented on Apr 8, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. OSBotify commented on Apr 8, 2026

    @OSBotify
    Contributor

    Investigation Summary. Classification: Frontend bug. Causing PR: #85229 (#85229) - Unlock landscape mode by @GCyganek (High confidence). Recommendation: REVERT. PR 85229 introduced landscape mode support and deliberately suppressed auto-focus in landscape mode via a Proxy-based ref wrapper (getLandscapeTextInputRefProxy) and an isInLandscapeMode guard in useAutoFocusInput. This suppression causes the cursor not to auto-appear on the amount input page when the device is in landscape mode, which is a significant UX regression for expense creation. Evidence: PR 85229 merged on 2026-04-07, is listed in StagingDeployCash for v9.3.54-0, and the issue body directly links PR 85229 as the source. The PR description states auto-focus is suppressed in landscape mode. Bug is staging-only. Verification: src/hooks/useAutoFocusInput.ts line 54 has an isInLandscapeMode early-return guard. src/libs/getLandscapeTextInputRefProxy.ts no-ops focus() calls in landscape. Both files were added/modified by PR 85229. Root Cause: The auto-focus suppression added by PR 85229 to prevent the keyboard from auto-popping in landscape mode is applied too broadly and breaks cursor auto-focus on the amount input page. Assigned: @GCyganek (author), @rushatgabhane, @truph01, @mjasikowski (approving reviewers). Labels: DeployBlockerCash kept.

  6. MelvinBot commented on Apr 8, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    PR #85229 ("Unlock landscape mode") introduced a blanket auto-focus suppression for all text inputs on native in landscape mode. It works via two mechanisms:

    1. Proxy-based ref wrapper (src/libs/getLandscapeTextInputRefProxy.ts): BaseTextInput wraps its forwarded ref in a Proxy that replaces focus() with a no-op when in landscape mode (src/components/TextInput/BaseTextInput/implementation/index.native.tsx:377).
    2. autoFocus prop override: BaseTextInput forces autoFocus={false} in landscape (index.native.tsx:391).

    The amount input page (IOURequestStepAmount) has its own useFocusEffect that calls textInput.current?.focus() after a timeout (src/pages/iou/request/step/IOURequestStepAmount.tsx:171). But textInput.current is the Proxy-wrapped ref from BaseTextInput, so the focus() call silently does nothing.

    What changes do you think we should make in order to solve the problem?

    Add a prop (e.g., allowFocusInLandscape) to BaseTextInput that skips the Proxy wrapping and the autoFocus override when set to true. Pass this prop through the amount input's text input chain (NumberWithSymbolForm / TextInputWithCurrencySymbol -> TextInput -> BaseTextInput).

    The amount input uses a BigNumberPad (custom on-screen numpad) rather than the system keyboard, so the original concern that motivated the suppression (keyboard covering the screen in landscape) does not apply here.

    Key code locations
    • Proxy wrapper: src/libs/getLandscapeTextInputRefProxy.ts:12-24
    • BaseTextInput applying proxy + autoFocus override: src/components/TextInput/BaseTextInput/implementation/index.native.tsx:377-391
    • Amount step focus call (blocked by proxy): src/pages/iou/request/step/IOURequestStepAmount.tsx:166-179
    • Ref forwarding chain: IOURequestStepAmount -> MoneyRequestAmountForm -> NumberWithSymbolForm -> TextInput -> BaseTextInput

    What alternative solutions did you explore? (Optional)

    An alternative is to bypass the Proxy entirely at the IOURequestStepAmount level by accessing the underlying raw ref. However, this is a workaround rather than a proper fix — adding an opt-out prop to BaseTextInput is cleaner and reusable for any future inputs that use custom keypads instead of the system keyboard.


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. rushatgabhane commented on Apr 8, 2026

    @rushatgabhane
    Member

    I'd say this is not a blocker because landscape mode is a new feature. Let's fix it as a regular issue

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Apr 8, 2026
  9. mrejdak commented on Apr 9, 2026

    @mrejdak
    Contributor

    Focus on textInput causes a glitch when attempting to scroll down, which likely is connected to the #87364 issue, so this should wait until we have a fix for it

    Screen.Recording.2026-04-09.at.17.40.37.mov
  10. removed their assignment
    on Apr 13, 2026
  11. melvin-bot commented on May 4, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. @mjasikowski, @GCyganek, @truph01 eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  12. GCyganek commented on May 5, 2026

    @GCyganek
    Contributor

    PR in prod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringMonthlyKSv2ReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions