Android & iOS - Expense - Description field is not visible when focused#94398
Android & iOS - Expense - Description field is not visible when focused#94398thelullabyy wants to merge 4 commits into
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@aimane-chnaif Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d2f8c50520
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| keyboardListenerRef.current = Keyboard.addListener('keyboardDidShow', () => { | ||
| cleanup(); | ||
| // Give the layout a moment to settle after the keyboard has fully appeared. | ||
| scrollTimeoutRef.current = setTimeout(performScroll, CONST.ANIMATION_IN_TIMING); |
There was a problem hiding this comment.
Use a resize-safe keyboard signal on Android
In this app MainActivity runs with android:windowSoftInputMode="adjustResize" (android/app/src/main/AndroidManifest.xml:47) while minSdkVersion is 24, and React Native documents that keyboardDidShow is not fired on Android 10 and below in this mode (https://reactnative.dev/docs/0.85/keyboard#addlistener). On those supported devices this listener path never runs; for the first focus (and any case where isKeyboardShown has not been set yet) the field stays behind the keyboard until the 1s safety timeout fires, so the focused description/merchant field is still not visible when focused. Use the keyboard-controller events already used by withKeyboardState or another Android-safe settled-layout fallback here instead of waiting on RN Keyboard.
Useful? React with 👍 / 👎.
| value={displayMerchantValue} | ||
| readOnly={didConfirm} | ||
| onChangeText={handleMerchantInputChange} | ||
| onFocus={() => scrollFocusedInputIntoView?.(inputRef.current)} |
There was a problem hiding this comment.
Do we need to support merchant field as well?
This is single line field and auto-scroll already working as expected.
| value={iouComment ?? ''} | ||
| readOnly={didConfirm} | ||
| onChangeText={handleDescriptionInputChange} | ||
| onFocus={() => scrollFocusedInputIntoView?.(inputRef.current)} |
There was a problem hiding this comment.
Is it expected multiline input is disabled on mobile?
Explanation of Change
Fixed Issues
$ #94274
PROPOSAL: NA
Tests
Enable
newManualExpenseFlowbetaOffline tests
QA Steps
Enable
newManualExpenseFlowbetaPR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-06-24.at.01.02.03.mov
Android: mWeb Chrome
Screen.Recording.2026-06-24.at.00.57.27.mov
iOS: Native
Screen.Recording.2026-06-24.at.00.37.59.mov
iOS: mWeb Safari
Screen.Recording.2026-06-24.at.00.51.39.mov
MacOS: Chrome / Safari
Screen.Recording.2026-06-24.at.00.52.37.mov