Skip to content

Display and Legal name fields are not autofocused when navigated to #60569

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

Closed
3 of 8 tasks
mitarachim opened this issue Apr 21, 2025 · 8 comments
Closed
3 of 8 tasks

Display and Legal name fields are not autofocused when navigated to #60569

mitarachim opened this issue Apr 21, 2025 · 8 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@mitarachim
Copy link

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.1.30-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: #59087
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Windows 11/ Chrome, Android 13/ Chrome
App Component: User Settings

Action Performed:

  1. Sign in to staging.new.expensify.com
  2. Navigate to account settings > Profile
  3. Navigate to Display name
  4. Closes the "Display name" RHP
  5. Navigate to Legal name

Expected Result:

Fields in display and legal name are autofocused

Actual Result:

Fields in the display and legal name are not focused

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6808243_1745226960399.bandicam_2025-04-21_12-05-10-222.mp4

View all open jobs on GitHub

@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Apr 21, 2025
Copy link

melvin-bot bot commented Apr 21, 2025

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

@ishakakkad
Copy link
Contributor

ishakakkad commented Apr 21, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-04-21 09:32:52 UTC.

Proposal

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

Display and Legal name fields are not autofocused when navigated to

What is the root cause of that problem?

We are not autofocused text input here

<InputWrapper
InputComponent={TextInput}
inputID={INPUT_IDS.FIRST_NAME}
name="fname"
label={translate('common.firstName')}
aria-label={translate('common.firstName')}
role={CONST.ROLE.PRESENTATION}
defaultValue={currentUserDetails.firstName ?? ''}
spellCheck={false}
autoCapitalize="words"
/>

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

To fix this issue we need to pass autoFocus here

<InputWrapper
                            InputComponent={TextInput}
                            inputID={INPUT_IDS.FIRST_NAME}
                            name="fname"
                            label={translate('common.firstName')}
                            aria-label={translate('common.firstName')}
                            role={CONST.ROLE.PRESENTATION}
                            defaultValue={currentUserDetails.firstName ?? ''}
                            spellCheck={false}
                            autoCapitalize="words"
                            autoFocus
                        />

We haven't passed autofocus here

Same applied for legal name here

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

NA UI BUG

What alternative solutions did you explore? (Optional)

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.

@daledah
Copy link
Contributor

daledah commented Apr 21, 2025

This is expected, we will not focus when there are 2 or more inputs

@truph01
Copy link
Contributor

truph01 commented Apr 21, 2025

Proposal

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

  • Fields in the display and legal name are not focused

What is the root cause of that problem?

  • We don't apply auto focus logic applied in DisplayNamePage and LegalNamePage.

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

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

  • UI bug

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Apr 23, 2025
Copy link

melvin-bot bot commented Apr 28, 2025

@strepanier03 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

1 similar comment
Copy link

melvin-bot bot commented Apr 29, 2025

@strepanier03 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@strepanier03
Copy link
Contributor

Going to close this out as expected behavior and per confirmation from @daledah as well:

This is expected, we will not focus when there are 2 or more inputs

@truph01
Copy link
Contributor

truph01 commented Apr 29, 2025

@strepanier03 Could you help check again? In other flows where there are more than 2 inputs, the first one is always auto-focused.

For example, in http://staging.new.expensify.com/new/task/details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
None yet
Development

No branches or pull requests

5 participants