Skip to content

[Due for payment 2025-03-13] [$250] Web - Action menu - Pressing tab does not navigate through action menu badges #57022

Closed

Description

@IuliiaHerets

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: 56992
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5605616
Issue reported by: Applause Internal Team
Device used: v9.1.0-0
App Component: Chat Report View

Action Performed:

  1. sign in to staging.new.expensify.com
  2. Navigate to a conversation with comments or messages sent already
  3. Click on a comment or message
  4. Press tab to navigate through action menu badges

Expected Result:

User can navigate through action menu badges by pressing tab to reach emoji picker.

Actual Result:

Pressing tab after the first badge is highlighted, stops navigating through action menu badges and navigates through conversation.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6746658_1739882211399.bandicam_2025-02-18_14-34-12-449.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021892038726903190623
  • Upwork Job ID: 1892038726903190623
  • Last Price Increase: 2025-02-19
Issue OwnerCurrent Issue Owner: @jliexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 18, 2025
  2. melvin-bot commented on Feb 18, 2025

    @melvin-bot

    Triggered auto assignment to @jliexpensify (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.

  3. linhvovan29546 commented on Feb 18, 2025

    @linhvovan29546
    Contributor

    Proposal

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

    Web - Action menu - Pressing tab does not navigate through action menu badges

    What is the root cause of that problem?

    We display the action menu when hovering, based on the hovered state of the Hoverable component.

    <Hoverable
    shouldHandleScroll
    isDisabled={draftMessage !== undefined}
    shouldFreezeCapture={isPaymentMethodPopoverActive}
    onHoverIn={() => {
    setIsReportActionActive(false);
    }}
    onHoverOut={() => {
    setIsReportActionActive(!!isReportActionLinked);
    }}
    >
    {(hovered) => (

    However, when we press 'Tab' to focus to the next item, the onBlur inside ActiveHoverable is triggered, causing hovered to be false lead to the action menu being hidden, preventing focus from moving to the next action menu item.

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

    Previously, we only set hovered is false when clicking outside the element. However, in this PR (#54744), that logic was removed.
    I think we should reintroduce that logic here.

    onBlur: (e: MouseEvent) => {
    handleMouseEvents('blur')();
    onBlur?.(e);

                if (!elementRef.current?.contains(e.target as Node) && !elementRef.current?.contains(e.relatedTarget as Node)) {
                    handleMouseEvents('blur')();
                }

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A, UI bug

    What alternative solutions did you explore? (Optional)

    N/A
    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. bernhardoj commented on Feb 18, 2025

    @bernhardoj
    Contributor

    Proposal

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

    Pressing Tab doesn't navigate through the emoji reaction.

    What is the root cause of that problem?

    When we are navigating through the reaction using Tab, the report action item is blurred. If it's blurred, the hovered state is set to false.

    onBlur: (e: MouseEvent) => {
    handleMouseEvents('blur')();
    onBlur?.(e);

    const newHoverState = type === 'enter';
    isHoveredRef.current = newHoverState;
    isVisibilityHidden.current = false;
    updateIsHovered(newHoverState);

    And the mini context menu won't show anymore if it's not hovered.

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

    The onBlur was first added at #14377 which then causes some issues which keep getting patched until #20561.

    The issue that the onBlur is trying to solve isn't reproducible anymore, so I suggest removing the onBlur workaround to set the hovered state to false. Hover state should rely only on mouse enter and leave event.

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A

  5. github-actions commented on Feb 18, 2025

    @github-actions
    Contributor

    ⚠️ @bernhardoj Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 19, 2025
  7. changed the title [-]Web - Action menu - Pressing tab does not navigate through action menu badges[/-] [+][$250] Web - Action menu - Pressing tab does not navigate through action menu badges[/+] on Feb 19, 2025
  8. melvin-bot commented on Feb 19, 2025

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 19, 2025
  10. melvin-bot commented on Feb 19, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (External)

  11. jliexpensify commented on Feb 19, 2025

    @jliexpensify
    Contributor

    I can repro this one

  12. 22 remaining items

  13. melvin-bot commented on Mar 6, 2025

    @melvin-bot

    @ishpaul777 @jliexpensify @ishpaul777 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]

  14. jliexpensify commented on Mar 9, 2025

    @jliexpensify
    Contributor

    Bumping @ishpaul777 for the checklist

  15. ishpaul777 commented on Mar 10, 2025

    @ishpaul777
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • [xx] 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: https://github.com/Expensify/App/pull/54744/files#r1990069687

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: No neec

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Not required, we removed whole logic that caused this so there's no need

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  16. ishpaul777 commented on Mar 10, 2025

    @ishpaul777
    Contributor

    doing it in few mins done

  17. jliexpensify commented on Mar 13, 2025

    @jliexpensify
    Contributor

    Payment Summary

  18. bernhardoj commented on Mar 13, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  19. ishpaul777 commented on Mar 13, 2025

    @ishpaul777
    Contributor

    Requested in ND.

  20. JmillsExpensify commented on Mar 17, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

  21. garrettmknight commented on Mar 24, 2025

    @garrettmknight
    Contributor

    $250 approved for @ishpaul777

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions