You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expense - Unable to type number when numpad is out of focus #64957
👋 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:
Identify the pull request that introduced this issue and revert it.
@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.
@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.
Reacted by Jon Dubielzyk, Danny McClain and Clara Jones
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.
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.
Activity
melvin-bot commentedon Jun 25, 2025
Triggered auto assignment to @mjasikowski (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Jun 25, 2025
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Jun 25, 2025
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.github-actions commentedon Jun 25, 2025
👋 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:
vincdargento commentedon Jun 25, 2025
@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.
mjasikowski commentedon Jun 25, 2025
@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.
mjasikowski commentedon Jun 25, 2025
In any case, I'm also removing the blocker label since it's just a minor UI issue.
daledah commentedon Jun 26, 2025
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
MoneyRequestAmountFormWe should add the logic to focus on the input when users enter key like what we did inComposerWithSuggestionsHere is the sample code
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.
dubielzyk-expensify commentedon Jun 26, 2025
@mjasikowski should we not close this as this is expected behavior?
dannymcclain commentedon Jun 26, 2025
Agree we should close.
mjasikowski commentedon Jun 26, 2025
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.
mountiny commentedon Jun 26, 2025
Close