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
[$175] Describe Rule obscured after dismissing keyboard using Android navigation bar #106343
Version Number: v9.5.34-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:#105662 Email or phone of affected tester (no customers):setowskiw+70@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Samsung Galaxy S21 FE/Android 16 App Component: Other
Action Performed:
Launch Expensify app
Navigate to a Control workspace
Select Rules and tap Add rule
Tap the Describe field under Or just describe it below
Dismiss the keyboard using the downward chevron in the Android navigation bar
Tap the Describe field again
Expected Result:
The page scrolls to position the entire Describe field and Next button above the keyboard
Actual Result:
The page doesn't scroll properly when the keyboard is reopened. The Describe field is partially obscured by the keyboard, and the Next button isn't visible.
changed the title [-]Describe Rule obscured after dismissing keyboard using Android navigation bar[/-][+][$175] Describe Rule obscured after dismissing keyboard using Android navigation bar[/+]on Nov 9, 2026
Verified signed-in dev NewDot web. Describe-field checks were blocked by the Control-plan upgrade gate; no upgrade was approved and no rule was submitted. Android-specific behavior remains unverified.
Step
Status
Launch signed-in AppHome, Workspaces, and Account navigation were visible.
✅
Navigate to Control workspaceSelecting Control opened a paid Upgrade confirmation; testing stopped without approving it.
⚠️
Open Rules > Add ruleBlocked by the Control-plan prerequisite.
⚠️
Focus Describe and inspect field/Next visibilityAdd rule was not reached.
⚠️
Dismiss keyboard using Android navigation-bar chevronThis native Android control is unavailable on web.
⚠️
Refocus Describe and inspect visibilityAdd rule was not reached; no visibility conclusion was established.
⚠️
Proposal
What is the root cause of that problem?
Likely cause — medium confidence: The Describe field scrolls into view on input focus, not when the keyboard reopens. Android can hide the keyboard without clearing input focus. If that happens here, tapping the already-focused field reopens the keyboard without repeating the corrective scroll, leaving the field and Next obscured.
Code evidence
The form disables Android’s automatic focus scrolling and supplies its own scroll callback: DescribeRuleForm.tsx:299–320.
The app already documents Android’s retained-focus behavior and provides a hook to handle it: useBlurOnKeyboardHide/index.android.ts:11–15. The Describe form does not use that hook.
These references match the reported release. The missing second focus event has not been observed on the affected device.
What changes do you think we should make in order to solve the problem?
First verify whether chevron dismissal leaves the input focused and whether the second tap omits onFocus.
If confirmed, the smallest supported candidate is to reuse the existing Android-specific blur-on-keyboard-hide hook locally in DescribeRuleForm. Keep automatic focus scrolling disabled to preserve the earlier double-scroll fix.
Validate normal and rapid dismissal/reopening on Android before accepting this candidate as the solution.
What alternative solutions did you explore? (Optional)
If the second tap does fire onFocus, retained focus is not the explanation. Investigate whether the delayed scroll runs before keyboard/layout changes finish. Increasing the delay or restoring native scrolling is not justified without that evidence.
Next Steps for Contributor+ team:
Confirm the Android focus-event sequence before accepting this fix. To accept:@MelvinBot implement [this](hyperlink) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
Please re-state the problem that we are trying to solve in this issue.
On Android, in a Control workspace, Rules > Add rule: tap the Describe field, dismiss the keyboard with the downward chevron in the Android navigation bar, then tap the Describe field again. The page does not scroll, so the Describe field stays partly obscured by the reopened keyboard and the Next button is not visible.
What is the root cause of that problem?
The only thing that scrolls this form to the input is the focus handler. In src/pages/workspace/rules/DescribeRuleForm.tsx, the input has onFocus={scrollToInput} (line ~365), which calls formRef.current?.scrollTo(inputTopOffsetRef.current) (line ~301), and shouldScrollChildToFocus={false} is set deliberately (line ~320, with the comment that if Android also moves the box, the page moves two times). So nothing else ever scrolls the input into view.
On Android, dismissing the keyboard with the nav-bar chevron hides the keyboard WITHOUT blurring the TextInput - the input keeps focus. When the keyboard hides, the form's scroll position resets, but re-tapping the field fires no onFocus event (focus never left), so scrollToInput never re-runs and the field stays under the reopened keyboard.
What changes do you think we should make in order to solve the problem?
Re-run the scroll when the keyboard reappears while the input is already focused: in DescribeRuleForm, subscribe to keyboardDidShow and, if inputRef.current?.isFocused(), call scrollToInput() (which scrolls to the already-measured inputTopOffsetRef.current, set in the input container's onLayout). This leaves the first-focus path untouched, so there is no double-scroll on first focus, and iOS behavior is unchanged.
What alternative solutions did you explore? (Optional)
Blurring the input when the keyboard hides, so a fresh focus event fires on re-tap. I prefer the keyboardDidShow route: it does not fight the focus state the user expects (the cursor stays in the field) and it cannot introduce a blur/focus flicker on other screens that reuse this form.
What tests will you run to verify the fix works?
Reproduce on Android (Samsung Galaxy S21 FE / Android 16, as reported): open Add rule, tap Describe, dismiss the keyboard with the nav-bar chevron, re-tap Describe - the field and the Next button must both sit fully above the keyboard.
Please re-state the problem that we are trying to solve in this issue.
On Android, in a Control workspace, navigating to Rules > Add rule, tapping the Describe field under "Or just describe it below", dismissing the software keyboard using the downward chevron in the Android navigation bar, and then tapping the Describe field again causes the keyboard to reopen without scrolling the field into view. The Describe field remains partially obscured and the Next button is hidden beneath the keyboard.
What is the root cause of that problem?
In PR #105662 (Stop the New rule page from scrolling twice on Android), shouldScrollChildToFocus={false} was introduced on FormProvider in src/pages/workspace/rules/DescribeRuleForm.tsx (line 320) to prevent Android's native scrollsChildToFocus from producing a jarring double-scroll jump on first focus, delegating the corrective scroll exclusively to onFocus={scrollToInput} (line 365).
However, on Android, dismissing the software keyboard via the downward navigation-bar chevron or system back gesture dismisses the keyboard window without clearing focus on the native EditText (as documented in src/hooks/useBlurOnKeyboardHide/index.android.ts). Because JS never receives an onBlur event, the input retains focus in the component tree. When the user taps the Describe field a second time to bring back the keyboard, React Native does not fire a new onFocus event because focus never left. Consequently, scrollToInput is never called, and because shouldScrollChildToFocus is false, no scrolling occurs—leaving the input and Next button obscured beneath the keyboard.
What changes do you think we should make in order to solve the problem?
useBlurOnKeyboardHide was architected specifically for this Android behavior in src/hooks/useBlurOnKeyboardHide/index.android.ts. It already handles device rotation delays, window width changes, and AppState background transitions cleanly.
When the keyboard hides via the Android navigation bar chevron, useBlurOnKeyboardHide explicitly blurs inputRef.
When the user taps the Describe field again, a standard onFocus event fires and invokes scrollToInput(), smoothly scrolling the Describe field and the Next button above the keyboard.
It is a clean no-op on non-Android platforms (src/hooks/useBlurOnKeyboardHide/index.ts).
What alternative solutions did you explore? (Optional)
Adding a keyboardDidShow event listener: Subscribing to keyboardDidShow inside DescribeRuleForm fires on every keyboard appearance, including initial mount/focus. This creates duplicate scroll invocations that fight the initial onFocus={scrollToInput} and risks re-introducing the double-scroll jump that PR Stop the New rule page from scrolling twice on Android #105662 specifically eliminated. Furthermore, leaving the input focused while the keyboard is dismissed causes inconsistent cursor/selection behavior on Android.
Passed: 69 targeted tests, lint, typecheck, spelling, Oxfmt, and Storybook smoke tests. Full Jest and React Compiler verification remain incomplete. Android device validation is still required.
📣 @dmkt9 We're missing your Upwork ID to automatically send you an offer for the Reviewer role.
Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Activity
applause-bot commentedon Nov 9, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/e2af6c73e0e6acde6fe09e7b549f97c319eb74b645a2effdcc5a621af6008442
melvin-bot commentedon Nov 9, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dmkt9 (
External)[-]Describe Rule obscured after dismissing keyboard using Android navigation bar[/-][+][$175] Describe Rule obscured after dismissing keyboard using Android navigation bar[/+]melvin-bot commentedon Nov 9, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022119671643413166870
MelvinBot commentedon Nov 9, 2026
🤖 Web test steps verification results:⚠️ partial
Verified signed-in dev NewDot web. Describe-field checks were blocked by the Control-plan upgrade gate; no upgrade was approved and no rule was submitted. Android-specific behavior remains unverified.
Launch signed-in App
Home, Workspaces, and Account navigation were visible.Navigate to Control workspace
Selecting Control opened a paid Upgrade confirmation; testing stopped without approving it.Open Rules > Add rule
Blocked by the Control-plan prerequisite.Focus Describe and inspect field/Next visibility
Add rule was not reached.Dismiss keyboard using Android navigation-bar chevron
This native Android control is unavailable on web.Refocus Describe and inspect visibility
Add rule was not reached; no visibility conclusion was established.Proposal
What is the root cause of that problem?
Likely cause — medium confidence: The Describe field scrolls into view on input focus, not when the keyboard reopens. Android can hide the keyboard without clearing input focus. If that happens here, tapping the already-focused field reopens the keyboard without repeating the corrective scroll, leaving the field and Next obscured.
Code evidence
onFocus; layout only records the target position: DescribeRuleForm.tsx:348–372.These references match the reported release. The missing second focus event has not been observed on the affected device.
What changes do you think we should make in order to solve the problem?
First verify whether chevron dismissal leaves the input focused and whether the second tap omits
onFocus.If confirmed, the smallest supported candidate is to reuse the existing Android-specific blur-on-keyboard-hide hook locally in DescribeRuleForm. Keep automatic focus scrolling disabled to preserve the earlier double-scroll fix.
Validate normal and rapid dismissal/reopening on Android before accepting this candidate as the solution.
What alternative solutions did you explore? (Optional)
If the second tap does fire
onFocus, retained focus is not the explanation. Investigate whether the delayed scroll runs before keyboard/layout changes finish. Increasing the delay or restoring native scrolling is not justified without that evidence.Discovery during QA of Stop the New rule page from scrolling twice on Android does not establish that PR as the cause.
Potentially related issues: Description bar is not correctly centered after refocusing and New rule page still has a janky keyboard jump. Neither is a confirmed duplicate.
Next Steps for Contributor+ team:
Confirm the Android focus-event sequence before accepting this fix.
To accept:
@MelvinBot implement [this](hyperlink)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
khizzcr7 commentedon Nov 9, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On Android, in a Control workspace, Rules > Add rule: tap the Describe field, dismiss the keyboard with the downward chevron in the Android navigation bar, then tap the Describe field again. The page does not scroll, so the Describe field stays partly obscured by the reopened keyboard and the Next button is not visible.
What is the root cause of that problem?
The only thing that scrolls this form to the input is the focus handler. In
src/pages/workspace/rules/DescribeRuleForm.tsx, the input hasonFocus={scrollToInput}(line ~365), which callsformRef.current?.scrollTo(inputTopOffsetRef.current)(line ~301), andshouldScrollChildToFocus={false}is set deliberately (line ~320, with the comment that if Android also moves the box, the page moves two times). So nothing else ever scrolls the input into view.On Android, dismissing the keyboard with the nav-bar chevron hides the keyboard WITHOUT blurring the TextInput - the input keeps focus. When the keyboard hides, the form's scroll position resets, but re-tapping the field fires no
onFocusevent (focus never left), soscrollToInputnever re-runs and the field stays under the reopened keyboard.What changes do you think we should make in order to solve the problem?
Re-run the scroll when the keyboard reappears while the input is already focused: in
DescribeRuleForm, subscribe tokeyboardDidShowand, ifinputRef.current?.isFocused(), callscrollToInput()(which scrolls to the already-measuredinputTopOffsetRef.current, set in the input container'sonLayout). This leaves the first-focus path untouched, so there is no double-scroll on first focus, and iOS behavior is unchanged.What alternative solutions did you explore? (Optional)
Blurring the input when the keyboard hides, so a fresh focus event fires on re-tap. I prefer the
keyboardDidShowroute: it does not fight the focus state the user expects (the cursor stays in the field) and it cannot introduce a blur/focus flicker on other screens that reuse this form.What tests will you run to verify the fix works?
Enes2553 commentedon Nov 9, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On Android, in a Control workspace, navigating to Rules > Add rule, tapping the Describe field under "Or just describe it below", dismissing the software keyboard using the downward chevron in the Android navigation bar, and then tapping the Describe field again causes the keyboard to reopen without scrolling the field into view. The Describe field remains partially obscured and the Next button is hidden beneath the keyboard.
What is the root cause of that problem?
In PR #105662 (
Stop the New rule page from scrolling twice on Android),shouldScrollChildToFocus={false}was introduced onFormProviderinsrc/pages/workspace/rules/DescribeRuleForm.tsx(line 320) to prevent Android's nativescrollsChildToFocusfrom producing a jarring double-scroll jump on first focus, delegating the corrective scroll exclusively toonFocus={scrollToInput}(line 365).However, on Android, dismissing the software keyboard via the downward navigation-bar chevron or system back gesture dismisses the keyboard window without clearing focus on the native
EditText(as documented insrc/hooks/useBlurOnKeyboardHide/index.android.ts). Because JS never receives anonBlurevent, the input retains focus in the component tree. When the user taps the Describe field a second time to bring back the keyboard, React Native does not fire a newonFocusevent because focus never left. Consequently,scrollToInputis never called, and becauseshouldScrollChildToFocusisfalse, no scrolling occurs—leaving the input and Next button obscured beneath the keyboard.What changes do you think we should make in order to solve the problem?
Utilize Expensify's canonical Android hook
useBlurOnKeyboardHideinsidesrc/pages/workspace/rules/DescribeRuleForm.tsx:useBlurOnKeyboardHidefrom@hooks/useBlurOnKeyboardHide:inputReftouseBlurOnKeyboardHideinsideDescribeRuleForm:Why this is the optimal and clean fix:
useBlurOnKeyboardHidewas architected specifically for this Android behavior insrc/hooks/useBlurOnKeyboardHide/index.android.ts. It already handles device rotation delays, window width changes, andAppStatebackground transitions cleanly.useBlurOnKeyboardHideexplicitly blursinputRef.onFocusevent fires and invokesscrollToInput(), smoothly scrolling the Describe field and the Next button above the keyboard.src/hooks/useBlurOnKeyboardHide/index.ts).What alternative solutions did you explore? (Optional)
keyboardDidShowevent listener: Subscribing tokeyboardDidShowinsideDescribeRuleFormfires on every keyboard appearance, including initial mount/focus. This creates duplicate scroll invocations that fight the initialonFocus={scrollToInput}and risks re-introducing the double-scroll jump that PR Stop the New rule page from scrolling twice on Android #105662 specifically eliminated. Furthermore, leaving the input focused while the keyboard is dismissed causes inconsistent cursor/selection behavior on Android.shouldScrollChildToFocus={true}: Reverts PR Stop the New rule page from scrolling twice on Android #105662 and re-introduces the double-jump on first focus.What automated tests can you add to prevent this from re-occurring?
In
tests/unit/pages/workspace/rules/DescribeRuleFormTest.tsx:useBlurOnKeyboardHideis called withinputRef.Contributor details
Your Expensify account email: enesbilalolgun0@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~010415b62c29eb990f
melvin-bot commentedon Nov 9, 2026
Enes2553 commentedon Nov 9, 2026
Contributor details
Your Expensify account email: enesbilalolgun0@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~010415b62c29eb990f
melvin-bot commentedon Nov 9, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
10 remaining items
dmkt9 commentedon Nov 13, 2026
@MelvinBot create a patch.diff for this #106343 (comment)
MelvinBot commentedon Nov 13, 2026
Created the patch below. File upload was denied, so save the expanded contents as
patch.diff.origin/.Apply from the App repository root:
git apply --check patch.diff && git apply patch.diffpatch.diff — based on commit f966d70
view run
dmkt9 commentedon Nov 13, 2026
MelvinBot's proposal looks good to me
🎀 👀 🎀 C+
melvin-bot commentedon Nov 13, 2026
Triggered auto assignment to @deetergp, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
deetergp commentedon Nov 16, 2026
@dmkt9 Sounds good, run with it!
dmkt9 commentedon Nov 17, 2026
@MelvinBot implement this #106343 (comment)
MelvinBot commentedon Nov 17, 2026
🤖 Web test steps verification results:⚠️ partial
The web app remained blank, with the browser session reporting

connection_lost. Web behavior could not be verified.Launch signed-in Expensify
Blocked by a blank screen; signed-in state could not be verified.Navigate to a Control workspace
Blocked by the blank screen.Open Rules > Add rule
Workspace navigation was unavailable.Focus Describe; verify field and Next visibility
Add rule could not be reached.Dismiss keyboard using Android navigation-bar chevron
Unavailable on web; native behavior was not tested.Refocus Describe; verify visibility and typing
The Describe field could not be reached.Implemented in Restore Describe Rule scrolling when Android keyboard reopens, created as a draft and assigned to
dmkt9.Passed: 69 targeted tests, lint, typecheck, spelling, Oxfmt, and Storybook smoke tests. Full Jest and React Compiler verification remain incomplete. Android device validation is still required.
view run · no recording available
melvin-bot commentedon Nov 18, 2026
📣 @dmkt9 We're missing your Upwork ID to automatically send you an offer for the Reviewer role.
Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!
deetergp commentedon Nov 18, 2026
No update