Skip to content

[Due for payment 2026-02-27] Rules - Unable to save "Description" field by clicking enter as in the rest of the fields. #82891

Closed

Description

@mitarachim

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.22.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: #82438
Email or phone of affected tester (no customers): ibellicotest+2250@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Windows 11 / Chrome
App Component: Workspace Settings

Action Performed:

Prerequisite: Account has at least one workspace.
Prerequisite 2: Rules enabled.

  1. Open the staging.new.expensify.com website.
  2. Navigate to "Workspace" > "Rules" > "Add Merchant Rule"
  3. Open "Description" field.
  4. Add any description and click on "Enter" on keyboard to save the changes.
  5. Note that a new line is added instead of the editions being saved.

Expected Result:

Clicking on "Enter" on keyboard after editing "Description" field when creating new merchant rule, should save the editions.

Actual Result:

Clicking on "Enter" on keyboard after editing "Description" field when creating new merchant rule, adds a new line instead of saving the changes. Behaviour is different on other text fields, where clicking enter automatically saves editions.
Behaviour is also different on "Description" field while creating or editing an expense.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7082053_1771478049037.Set_19.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @NicMendonca

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Feb 19, 2026
  2. melvin-bot commented on Feb 19, 2026

    @melvin-bot

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

  3. melvin-bot commented on Feb 19, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 19, 2026

    @melvin-bot

    Triggered auto assignment to @NicMendonca (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  5. github-actions commented on Feb 19, 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.
  6. twilight2294 commented on Feb 19, 2026

    @twilight2294
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When editing the "Description" field in Rules (Add Merchant Rule), pressing Enter inserts a newline instead of saving/submitting the form, unlike all other text fields in Rules which correctly submit on Enter.

    What is the root cause of that problem?

    The root cause is in src/components/Rule/TextBase.tsx at lines 86–99. The InputWrapper component is rendered without the shouldSubmitForm prop when isMarkdownEnabled is true.

    In src/components/Form/InputWrapper.tsx (lines 31–52), the form submission logic evaluates: when autoGrowHeight={true} (set via autoGrowHeight={isMarkdownEnabled}), the input is treated as effectively multiline (isEffectivelyMultiline=true). For multiline inputs, Enter only submits if shouldSubmitForm && canUseHardwareKeyboard — but since shouldSubmitForm is never passed, this evaluates to false, and Enter inserts a newline instead.

    Other fields in Rules (Merchant, RenameMerchant, etc.) don't pass isMarkdownEnabled, so they aren't treated as multiline and submit correctly by default. Two other description fields in the app — src/pages/iou/request/step/IOURequestStepDescription.tsx (line 216) and src/pages/Search/SearchEditMultiple/SearchEditMultipleDescriptionPage.tsx (line 78) — already explicitly pass shouldSubmitForm alongside autoGrowHeight and work correctly, confirming this is an oversight.

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

    Add shouldSubmitForm={isMarkdownEnabled} to the InputWrapper in src/components/Rule/TextBase.tsx:

    <InputWrapper
        hint={hint}
        InputComponent={TextInput}
        inputID={fieldID}
        name={fieldID}
        defaultValue={typeof currentValue === 'string' ? currentValue : undefined}
        label={label}
        accessibilityLabel={title}
        role={CONST.ROLE.PRESENTATION}
        ref={inputCallbackRef}
        type={isMarkdownEnabled ? 'markdown' : undefined}
        autoGrowHeight={isMarkdownEnabled}
        maxAutoGrowHeight={isMarkdownEnabled ? variables.textInputAutoGrowMaxHeight : undefined}
        shouldSubmitForm={isMarkdownEnabled}  // ✅ ADD THIS LINE
    />

    This makes the Description field behave consistently with other description fields in the app. On hardware keyboard devices, Enter will submit the form; on touch-only devices, Enter will still insert a newline (by design, since canUseHardwareKeyboard would be false).

    What alternative solutions did you explore? (Optional)

    An alternative would be to always pass shouldSubmitForm={true} unconditionally, but tying it to isMarkdownEnabled is semantically cleaner — it ensures the prop is only set when the multiline markdown behavior is active, matching the exact pattern used in the two other description pages.

  7. 4 remaining items

  8. luacmartins commented on Feb 19, 2026

    @luacmartins
    Contributor

    We reverted the offending PR so this is NAB. PR to fix the issue is in review

  9. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Feb 20, 2026
  10. changed the title [-]Rules - Unable to save "Description" field by clicking enter as in the rest of the fields.[/-] [+][Due for payment 2026-02-27] Rules - Unable to save "Description" field by clicking enter as in the rest of the fields.[/+] on Feb 20, 2026
  11. melvin-bot commented on Feb 20, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  12. melvin-bot commented on Feb 20, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.23-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-02-27. 🎊

  13. melvin-bot commented on Feb 20, 2026

    @melvin-bot

    @luacmartins @NicMendonca The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions