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
Android - Expense - Cursor does not auto appear on amount input page in landscape mode #87314
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:
Launch Expensify app in landscape mode.
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.
👋 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.
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.
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:
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).
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.
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.
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
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!
Activity
melvin-bot commentedon Apr 8, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #85229
melvin-bot commentedon Apr 8, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 8, 2026
👋 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:
OSBotify commentedon Apr 8, 2026
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.
MelvinBot commentedon Apr 8, 2026
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:
src/libs/getLandscapeTextInputRefProxy.ts):BaseTextInputwraps its forwarded ref in aProxythat replacesfocus()with a no-op when in landscape mode (src/components/TextInput/BaseTextInput/implementation/index.native.tsx:377).autoFocusprop override:BaseTextInputforcesautoFocus={false}in landscape (index.native.tsx:391).The amount input page (
IOURequestStepAmount) has its ownuseFocusEffectthat callstextInput.current?.focus()after a timeout (src/pages/iou/request/step/IOURequestStepAmount.tsx:171). ButtextInput.currentis the Proxy-wrapped ref fromBaseTextInput, so thefocus()call silently does nothing.What changes do you think we should make in order to solve the problem?
Add a prop (e.g.,
allowFocusInLandscape) toBaseTextInputthat skips the Proxy wrapping and theautoFocusoverride when set totrue. 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
src/libs/getLandscapeTextInputRefProxy.ts:12-24src/components/TextInput/BaseTextInput/implementation/index.native.tsx:377-391src/pages/iou/request/step/IOURequestStepAmount.tsx:166-179IOURequestStepAmount->MoneyRequestAmountForm->NumberWithSymbolForm->TextInput->BaseTextInputWhat alternative solutions did you explore? (Optional)
An alternative is to bypass the Proxy entirely at the
IOURequestStepAmountlevel by accessing the underlying raw ref. However, this is a workaround rather than a proper fix — adding an opt-out prop toBaseTextInputis 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 thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.rushatgabhane commentedon Apr 8, 2026
I'd say this is not a blocker because landscape mode is a new feature. Let's fix it as a regular issue
mrejdak commentedon Apr 9, 2026
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
melvin-bot commentedon May 4, 2026
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!
GCyganek commentedon May 5, 2026
PR in prod