Skip to content

[Due for payment 2026-09-09] Home-Tapping disabled Send button with empty text removes focus and closes keypad #99573

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: V9.4.61-1
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: #98336
Email or phone of affected tester (no customers): dreamnitethedragon+vegst@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Redmi note 10s android 13
App Component: User Settings

Action Performed:

  1. Launch app
  2. In Home, keep cursor on search box
  3. Note box is outlined green active with keypad opened and since no text send button grey inactive
  4. Tap grey send button
  5. Note cursor disappear and box turned grey and keypad closed
  6. Go to Concierge
  7. Keep cursor on compose box
    8.Note box is outlined green active with keypad opened and since no text send button grey inactive
  8. Tap grey send button
  9. Note nothing happens as there is no text in compose box - ( cursor stays, compose box remains active with green outline and keypad shown)

Expected Result:

Tapping the grey/inactive Send button when the compose/search box is empty should have consistent behavior across Home and Concierge. The button should remain inactive and should not dismiss the keyboard or remove focus.

Actual Result:

On Home, tapping the grey Send button with an empty search box dismisses the keyboard, removes the cursor, and changes the box outline from green to grey.
On Concierge, tapping the grey Send button with an empty compose box does nothing; the cursor remains visible, the box stays outlined green, and the keyboard remains open.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7243272_1787750065306.Screenrecorder-2026-08-26-18-31-59-810.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7243272

Issue OwnerCurrent Issue Owner: @ZhenjaHorbach

Activity

  1. applause-bot commented on Aug 26, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/8ee22fb730799490e54fe3a9a9881c3acdf5d8acf9010f0c854060f2d6d60d48

  2. added
    DeployBlockerCash
    Bug
    on Aug 26, 2026
  3. melvin-bot commented on Aug 26, 2026

    @melvin-bot

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

  4. melvin-bot commented on Aug 26, 2026

    @melvin-bot

    @puneetlath @ZhenjaHorbach you have been assigned to this deploy blocker because you reviewed the offending PR: #98336

  5. melvin-bot commented on Aug 26, 2026

    @melvin-bot

    @adamgrzybowski you have been assigned to this deploy blocker because you authored the offending PR: #98336

  6. melvin-bot commented on Aug 26, 2026

    @melvin-bot

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

  7. github-actions commented on Aug 26, 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.
  8. MelvinBot commented on Aug 26, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #98336 - "[Home Page] Add Concierge prompt box to home For You section" by @adamgrzybowski (High confidence)
    Related Issues: #94497 (feature request the PR implemented)

    Recommendation: ROLL FORWARD

    The whole Concierge prompt box is a new feature added by this PR, so a targeted 2-line fix is far safer and simpler than reverting the entire feature. The new Home prompt box reimplemented the Concierge Send button but omitted the focus-preservation that the canonical ComposerSendButton has — add it back so the disabled Send button is a no-op when empty (matching Concierge).

    Assigned: @adamgrzybowski (PR author), @puneetlath and @ZhenjaHorbach (approving reviewers) — already assigned.
    Labels: No change. This is a frontend bug, so DeployBlockerCash (App deploy) correctly stays. No DeployBlocker (Web) label was present.

    📋 Detailed Analysis

    Evidence

    • The "Home search box" in the report is the new Concierge prompt box added to the Home "For You" section — a brand-new component src/pages/home/ForYouSection/ConciergePromptBox.tsx added entirely by PR [Home Page] Add Concierge prompt box to home For You section #98336 (confirmed via gh pr diff 98336; the file appears only as additions).
    • Reproducible on staging only, N/A in production — consistent with a new feature that does not exist in prod yet.
    • Both affected platforms are explained by the same omission: the web fix (Windows Chrome) is the missing onMouseDown preventDefault, and the native fix (Android App) is the missing focusable={false}. Both are present in the canonical Concierge Send button and both are absent in the new Home prompt box.

    Verification

    • Affected file: src/pages/home/ForYouSection/ConciergePromptBox.tsx. The Send button wrapper is rendered without any focus preservation:
      ConciergePromptBox.tsx#L260-L270
    • Concierge's compose box uses ComposerSendButton, which explicitly preserves focus:
      ComposerSendButton.tsx#L39-L70
      • onMouseDown={(e) => e.preventDefault()} on the wrapper View (line 43) — comment: "Keep focus on the composer when Send message is clicked."
      • focusable={false} (and accessible={false}) on the inner SubmitDraftButton (lines 63-66).
    • Both components render the same underlying SubmitDraftButton (definition); the difference is purely in the wrapper the caller provides.
    • The PR's own code comment says "Mirror ComposerSendButton" — but it mirrored only the justifyContentEnd layout, not the focus-preservation behavior.

    Root Cause

    When the input is empty, canSubmit is false, so onPress={submit} is already a no-op. The bug is not the press handler — it is that the Send button's press/tap still steals focus from the Composer:

    • On web (Windows Chrome), mousedown on the button blurs the focused Composer because the wrapper View lacks onMouseDown={(e) => e.preventDefault()}.
    • On Android native, the tap lands on a focusable button (no focusable={false}), which blurs the TextInput and dismisses the keyboard.

    The net effect: focus is removed, the box outline flips green→grey, and the keyboard closes. Concierge avoids all of this via ComposerSendButton.

    Exact fix location — src/pages/home/ForYouSection/ConciergePromptBox.tsx:261, the <View style={styles.justifyContentEnd}> wrapping SubmitDraftButton. Make it mirror ComposerSendButton:

    • Add onMouseDown={(e) => e.preventDefault()} to that wrapper View (line 261).
    • Pass focusable={false} (and accessible={false}) to the SubmitDraftButton (lines 262-269).

    💡 Suggested AI code review rule

    This bug is a recurring, mechanically detectable pattern (a Send/submit button placed next to a Composer/TextInput that reimplements the send affordance but drops the focus-preservation the canonical ComposerSendButton provides), so it may be worth a coding-standards rule so the AI reviewer catches the next one. Proposed for Expensify/App:

    • Rule: CLEAN-REACT-PATTERNS-10 — A send/submit button next to a text input must preserve the input's focus
    • Condition: When rendering SubmitDraftButton (or any interactive button) adjacent to a Composer/TextInput that should stay focused, wrap it like ComposerSendButton — onMouseDown={(e) => e.preventDefault()} on the wrapper and focusable={false} on the button — instead of re-implementing the button without them.
    • Why: Without focus preservation, tapping/clicking the button blurs the input and dismisses the keyboard (web via mousedown, Android via focus theft), even when the button is disabled. This caused [Due for payment 2026-09-09] Home-Tapping disabled Send button with empty text removes focus and closes keypad #99573.
    • Search pattern: <SubmitDraftButton usages outside ComposerSendButton.tsx whose enclosing JSX lacks both onMouseDown={(e) => e.preventDefault()} and focusable={false}.
    • Offending code (❌): ConciergePromptBox.tsx#L260-L270
    • Fix (✅): ComposerSendButton.tsx#L39-L70

    The full rule file, with the ❌/✅ code inline in App's coding-standards format, would go in Expensify/App itself. If it's worth adding, a maintainer can open it there as a draft PR.

  9. 5 remaining items

  10. added
    Weekly
    Daily
    and removed
    Reviewing
    Weekly
    on Aug 28, 2026
  11. changed the title [-]Home-Tapping disabled Send button with empty text removes focus and closes keypad[/-] [+][Due for payment 2026-09-09] Home-Tapping disabled Send button with empty text removes focus and closes keypad[/+] on Sep 2, 2026
  12. melvin-bot commented on Sep 2, 2026

    @melvin-bot

    @ZhenjaHorbach

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.65-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-09-09. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  13. ZhenjaHorbach commented on Sep 2, 2026

    @ZhenjaHorbach
    Contributor

    @puneetlath @grgia
    Let's close this!

  14. melvin-bot commented on Sep 7, 2026

    @melvin-bot

    @ZhenjaHorbach Huh... This is 4 days overdue. Who can take care of this?

  15. ZhenjaHorbach commented on Sep 8, 2026

    @ZhenjaHorbach
    Contributor

    @puneetlath @grgia
    Let's close this!

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

Metadata

Metadata

Labels

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions