-
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
Web - NetSuite - Input is not auto-focused in setup RHP after dismissing and restarting setup #53314
Comments
Triggered auto assignment to @VictoriaExpensify ( |
Edited by proposal-police: This proposal was edited at 2024-11-30 17:04:38 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Input is not auto-focused in setup RHP after dismissing and restarting the setup What is the root cause of that problem?This issue occurs due to a bug in the We're updating This creates an infinite loop: App/src/components/ConnectToNetSuiteFlow/index.tsx Lines 60 to 67 in 32ce9d4
App/src/components/ConnectToSageIntacctFlow/index.tsx Lines 65 to 72 in 32ce9d4
The infinite re-render then blocks the execution of What changes do you think we should make in order to solve the problem?Add an const horizontal = x + width;
const vertical = y + height;
// Check if the value has changed to prevent infinite re-renders
if(reuseConnectionPopoverPosition.horizontal !== horizontal || reuseConnectionPopoverPosition.vertical !== vertical) {
setReuseConnectionPopoverPosition({horizontal, vertical});
} What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?Write tests that ensure the |
Please re-state the problem that we are trying to solve in this issue.Input is not auto-focused in setup RHP after dismissing and restarting the setup What is the root cause of that problem?inputRef.current loses its relevance: By the time the task in InteractionManager executes, the reference to inputRef.current might be outdated or null. What changes do you think we should make in order to solve the problem?
Move focus() Outside of InteractionManager App/src/hooks/useAutoFocusInput.ts Lines 24 to 39 in f12b73c
useEffect(() => {
if (!isScreenTransitionEnded || !isInputInitialized || !inputRef.current || splashScreenState !== CONST.BOOT_SPLASH_STATE.HIDDEN) {
return;
}
inputRef.current?.focus();
const focusTaskHandle = InteractionManager.runAfterInteractions(() => {
if (inputRef.current && isMultiline) {
moveSelectionToEnd(inputRef.current);
}
setIsScreenTransitionEnded(false);
});
return () => {
focusTaskHandle.cancel();
};
}, [isMultiline, isScreenTransitionEnded, isInputInitialized, splashScreenState]); Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.0.68-2
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The input is auto-focused in the enter credentials RHP
Actual Result:
The input is not auto-focused in the enter credentials RHP. The issue also occurs when reconnecting to NetSuite after disconnecting
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6679690_1732854856554.2024-11-29_07_25_33.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: