Skip to content

Expense - Unable to type number when numpad is out of focus #64957

Closed

Description

@vincdargento

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: v9.1.71-4
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/6362900&group_by=cases:section_id&group_id=295818&group_order=asc
Email or phone of affected tester (no customers): gocemate+b215361@gmail.com
Issue reported by: Applause Internal Team
Device used: Lenovo 80ES / Windows 10 Pro
App Component: Money Requests

Action Performed:

  1. Click on the green plus button (FAB)
  2. Select Submit expense
  3. Select "Manual" if not selected
  4. Click outside the numpad
  5. Type any numbers

Expected Result:

BNP can still be used when tapping outside the amount input (doesn't loose focus)

Actual Result:

When create manual expense user can not type numbers if numpad is out of focus

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 25, 2025
  2. melvin-bot commented on Jun 25, 2025

    @melvin-bot

    Triggered auto assignment to @mjasikowski (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. melvin-bot commented on Jun 25, 2025

    @melvin-bot

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

  4. melvin-bot commented on Jun 25, 2025

    @melvin-bot

    Triggered auto assignment to @clarajones-expensify (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 Jun 25, 2025

    @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. vincdargento commented on Jun 25, 2025

    @vincdargento
    Author

    @clarajones-expensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

  7. mjasikowski commented on Jun 25, 2025

    @mjasikowski
    Contributor

    @clarajones-expensify I just talked with @dannymcclain and @dubielzyk-expensify and we collectively agreed that this is the expected behavior - you should be able to unfocus and if the field is not focused it shouldn't care about your inputs. I think we need to remove that part from testrail.

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jun 25, 2025
  9. mjasikowski commented on Jun 25, 2025

    @mjasikowski
    Contributor

    In any case, I'm also removing the blocker label since it's just a minor UI issue.

  10. daledah commented on Jun 26, 2025

    @daledah
    Contributor

    Proposal

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

    When create manual expense user can not type numbers if numpad is out of focus

    What is the root cause of that problem?

    We don't have the logic to focus on the input when users enter key

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

    In MoneyRequestAmountForm We should add the logic to focus on the input when users enter key like what we did in ComposerWithSuggestions

    Here is the sample code

       const focusComposerOnKeyPress = useCallback(
            (e: KeyboardEvent) => {
                // if we're typing on another input/text area, do not focus
                if (([CONST.ELEMENT_NAME.INPUT, CONST.ELEMENT_NAME.TEXTAREA] as string[]).includes((e.target as Element | null)?.nodeName ?? '')) {
                    return;
                }
    
                textInput.current?.focus();
            },
            [],
        );
    
        useEffect(() => {
            addKeyDownPressListener(focusComposerOnKeyPress);
            return () => {
                removeKeyDownPressListener(focusComposerOnKeyPress);
            };
        },[])
    

    We also can detect if users enter number to focus

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

    None

    What alternative solutions did you explore? (Optional)

    NA

    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.

  11. dubielzyk-expensify commented on Jun 26, 2025

    @dubielzyk-expensify
    Contributor

    @mjasikowski should we not close this as this is expected behavior?

  12. dannymcclain commented on Jun 26, 2025

    @dannymcclain
    Contributor

    Agree we should close.

  13. mjasikowski commented on Jun 26, 2025

    @mjasikowski
    Contributor

    asked on slack here whether anybody has any objections to removing this requirement from the regression tests (so we don't get this reopened). Let's give it a couple of hours and I'll close this one if there are no complaints.

  14. mountiny commented on Jun 26, 2025

    @mountiny
    Contributor

    Close

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.DailyKSv2Engineering

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions