Skip to content

Expense - Pressing space during inline editing opens the expense #88646

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.2.62-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: #83127
Email or phone of affected tester (no customers): jnsdijsnodjonjiosjdio@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create two expenses.
  4. Open the report.
  5. Click Merchant field.
  6. Press space.

Expected Result:

Space will be entered without opening the expense.

Actual Result:

Pressing space during inline editing opens the expense.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7136934_1776975837266.2.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @ahmedGaber93

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 23, 2026
  2. github-actions commented on Apr 23, 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.
  3. OSBotify commented on Apr 23, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #83127 - "Adds inline editing to transaction table cells on desktop" by @mohammadjafarinejad (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #83127 introduced the inline editing feature but has a bug where pressing Space during inline editing of the Merchant field fires the row's onPress handler (opening the expense) instead of entering a space character in the input.

    Assigned: @mohammadjafarinejad (PR author), @puneetlath (approving reviewer)
    Labels: DeployBlockerCash kept (frontend App bug). DeployBlocker removed — no backend involvement.

    Detailed Analysis

    Evidence

    • The issue is staging-only (version 9.2.62-0 / 9.3.62-0), not reproducible in production. This means it was introduced by a recently merged PR.
    • PR feat: Add inline editing for tables on desktop #83127 is included in the StagingDeployCash checklist and was merged on 2026-04-21, two days before the bug was reported.
    • PR feat: Add inline editing for tables on desktop #83127 adds inline editing to transaction table cells (MoneyRequestReportTransactionItem, TransactionItemRow, EditableCell, etc.) — exactly the code path the bug report describes.
    • The bug occurs on MacOS/Chrome (web), which is consistent with a react-native-web behavior where pressing Space fires onPress on elements with role="button".

    Verification

    Affected files: src/components/MoneyRequestReportView/MoneyRequestReportTransactionItem.tsx

    PR #83127 modifies this file and introduces the wasEditingOnMouseDownRef guard in onPress, but omits the isEditingCell guard that was added to the Search TransactionListItem equivalent.

    The PR diff for the Search TransactionListItem explicitly includes this comment and check:

    // react-native-web fires onPress on Space for role="button" elements; suppress it while a cell is being edited.
    if (isEditingCell) {
        return;
    }
    

    This guard was not added to MoneyRequestReportTransactionItem.tsx. The current code (post-PR) only has:

    onPress={() => {
        if (wasEditingOnMouseDownRef.current) {  // guards against click blur
            wasEditingOnMouseDownRef.current = false;
            return;
        }
        handleOnPress(transaction.transactionID);  // still fires on Space key
    }}

    Without the isEditingCell guard, pressing Space while the Merchant text input is focused causes the outer PressableWithFeedback (which has role="button") to receive the Space keypress event and fire its onPress, navigating into the expense.

    Root Cause

    PR #83127 added the isEditingCell Space-key suppression logic to TransactionListItem (used in Search) but did not apply the same fix to MoneyRequestReportTransactionItem (used in the expense report view). This inconsistency means Space key presses during inline editing are only suppressed in the Search flow, not in the Money Request Report view where the bug occurs.

    The fix is either to revert PR #83127 entirely, or to add if (isEditingCell) { return; } to the onPress handler in MoneyRequestReportTransactionItem.tsx (the isEditingCell value is already available at line 96 of that file).

  4. trjExpensify commented on Apr 24, 2026

    @trjExpensify
    Contributor

    I can repro this one in the report view, agree we should fix it. CC: @ahmedGaber93

  5. ahmedGaber93 commented on Apr 24, 2026

    @ahmedGaber93
    Contributor

    @mohammadjafarinejad returning early before here if fix the issue with me

      if (isEditingCell) {
          return;
      }
    

  6. puneetlath commented on Apr 24, 2026

    @puneetlath
    Contributor

    Inline editing reverted.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringHourlyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions