-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Taxes - BNP input is not auto focused in add rate page #51543
Comments
Triggered auto assignment to @thienlnam ( |
👋 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:
|
💬 A slack conversation has been started in #expensify-open-source |
Production: RPReplay_Final1730050554.MP4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Taxes - BNP input is not auto focused in add rate page What is the root cause of that problem?
App/src/components/AmountPicker/AmountSelectorModal.tsx Lines 42 to 48 in 5103b4b
What changes do you think we should make in order to solve the problem?
// Store the ref of the input
const inputRef = useRef<BaseTextInputRef | null>(null);
const focusTimeoutRef = useRef<NodeJS.Timeout | null>(null);
const inputCallbackRef = (ref: BaseTextInputRef | null) => {
inputRef.current = ref;
};
// use "useFocusEffect" focus on the input whenever "isVisible" state is changed.
useFocusEffect(
useCallback(() => {
focusTimeoutRef.current = setTimeout(() => {
if (inputRef.current && isVisible) {
inputRef.current.focus();
}
return () => {
if (!focusTimeoutRef.current || !isVisible) {
return;
}
clearTimeout(focusTimeoutRef.current);
};
}, CONST.ANIMATED_TRANSITION);
}, [isVisible, inputRef]),
);
// Pass the ref to "AmountForm"
ref={(ref) => inputCallbackRef(ref)} What alternative solutions did you explore? (Optional)Resulttax_amount_not_focused.mp4 |
But then wouldn't that mean that the issue should be reproducible in prod? |
I'm going to call this NAB - also I don't know if we need it to look "focused" - pressing numbers works fine |
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.0.54-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5134453
Email or phone of affected tester (no customers): applausetester+kh1610015@applause.expensifail.com
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
BNP input will be auto focused
Actual Result:
BNP input is not auto focused
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6647125_1730008681078.ScreenRecording_10-27-2024_13-52-22_1.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: