Skip to content

Web - Expense - Buttons do not appear when hovering over receipt while it is loading #84354

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.32-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: #83994
Email or phone of affected tester (no customers): sjodijsoijosjoidsji@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 an expense with receipt.
  4. Open the expense.
  5. Quickly hover over the receipt when the receipt is loading.

After the receipt loads, buttons will appear on the receipt.

After the receipt loads, buttons do not appear on the receipt.

#83994

Expected Result:

Full screen button will not show blue border after closing receipt view with ESC key.

Actual Result:

Full screen button has blue border after closing receipt view with ESC key.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Image
Bug7095233_1772769880546.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.
    DeployBlockerIndicates it should block deploying the API
    on Mar 6, 2026
  2. melvin-bot commented on Mar 6, 2026

    @melvin-bot

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

  3. melvin-bot commented on Mar 6, 2026

    @melvin-bot

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

  4. melvin-bot commented on Mar 6, 2026

    @melvin-bot

    Triggered auto assignment to @johncschuster (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 Mar 6, 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. MelvinBot commented on Mar 6, 2026

    @MelvinBot
    Contributor

    Proposal

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

    There are two bugs introduced by PR #83994:

    1. Buttons don't appear on hover during loading: If you hover over the receipt while it's still loading, the enlarge/add-receipt overlay buttons never appear — even after the image finishes loading. You must move the mouse out and back in.
    2. Blue focus border after ESC: After opening the receipt fullscreen modal via the enlarge button and closing it with ESC, the enlarge button shows a blue border (browser :focus-visible ring).

    What is the root cause of that problem?

    Bug 1: In src/components/ReportActionItem/MoneyRequestReceiptView.tsx:442, the onMouseEnter handler is gated behind !isLoading:

    onMouseEnter={() => !isLoading && hoverBind.onMouseEnter()}
    

    If the mouse enters while isLoading is true, hoverBind.onMouseEnter() is never called, so hovered stays false. When loading finishes, canShowReceiptActions becomes true and the buttons render into the DOM, but since hovered is still false, they get opacity: 0 (line 463). The browser won't re-fire mouseenter because the cursor is already inside the element.

    The !isLoading guard is redundant — canShowReceiptActions (line 339) already includes !isLoading, so buttons are never rendered during loading regardless of hover state.

    Bug 2: The receiptActionButton style (src/styles/index.ts:3633-3638) has no outline suppression. When ESC closes the transparent modal, browser focus returns to the enlarge button. Since ESC is a keyboard event, the browser applies :focus-visible styling (blue outline). The PressableWithoutFeedback component strips focusStyle but doesn't suppress the native browser outline.

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

    Bug 1: In src/components/ReportActionItem/MoneyRequestReceiptView.tsx, remove the !isLoading guard on onMouseEnter (line 442). Change:

    onMouseEnter={() => !isLoading && hoverBind.onMouseEnter()} → onMouseEnter={hoverBind.onMouseEnter}

    This is safe because canShowReceiptActions already prevents button rendering during loading. This also matches how other useHover consumers work (e.g., ReceiptCell.tsx calls bind.onMouseEnter() unconditionally).

    Bug 2: In src/styles/index.ts, add outline suppression to the receiptActionButton style. The codebase has an existing addOutlineWidth utility and noOutline style for this exact purpose — apply outlineStyle: 'none' to receiptActionButton. This fixes both the enlarge button and the adjacent attachment picker button since they share the same style.

    What alternative solutions did you explore? (Optional)

    • For Bug 1: Could use a useEffect to re-check hover state when isLoading transitions to false, but that's overengineered — simply removing the redundant guard is cleaner and matches existing patterns.
    • For Bug 2: Could pass tabIndex={-1} to prevent keyboard focus entirely, but that would hurt keyboard accessibility. The outlineStyle: 'none' approach preserves accessibility.

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. 32 remaining items

  8. johncschuster commented on Mar 25, 2026

    @johncschuster
    Contributor

    @TaduJR is this a follow-up PR for you as well?

  9. TaduJR commented on Mar 25, 2026

    @TaduJR
    Contributor

    @johncschuster

    Yes we can close them all that @ahmedGaber93 commented with

    Follow-up PR — no payment required.

    They are all regression fix.

  10. johncschuster commented on Mar 26, 2026

    @johncschuster
    Contributor

    Payment Summary

  11. ahmedGaber93 commented on Mar 29, 2026

    @ahmedGaber93
    Contributor

    Not overdue.

  12. changed the title [-][Due for payment 2026-03-30] Web - Expense - Buttons do not appear when hovering over receipt while it is loading[/-] [+]Web - Expense - Buttons do not appear when hovering over receipt while it is loading[/+] on Mar 30, 2026
  13. melvin-bot commented on Apr 2, 2026

    @melvin-bot

    @ahmedGaber93 Whoops! This issue is 2 days overdue. Let's get this updated quick!

  14. ahmedGaber93 commented on Apr 2, 2026

    @ahmedGaber93
    Contributor

    Not overdue, @johncschuster I think we can close this now.

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