Skip to content

[Due for payment 2026-09-16] [$250] Tax - No autofocus in the name editing menu taxes #76650

Closed

Description

@lanitochka17

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.2.71-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://test-management.browserstack.com/projects/2219752/test-runs/TR-2266/folder/13176868/41237324/1054918525?sort=%2Bidentifier
Email or phone of affected tester (no customers): sustinov@applausemail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open Expensify app
  2. Log in with your HT account
  3. Create a new WS
  4. Go to the More features menu in the WS settings
  5. Enable Taxes
  6. Go to the Taxes menu
  7. Tap +Add rate
  8. Tap the Name field

Expected Result:

When navigating to the Tax name editing menu, the name field should be autofocused and the keyboard should appear

Actual Result:

No autofocus in the name editing menu tax

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug7019796_1764782332205.Screenrecording_12-03-2025_20-10-59_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021999623089089742669
  • Upwork Job ID: 1999623089089742669
  • Last Price Increase: 2026-03-09
  • Automatic offers:
    • samranahm | Contributor | 109838252
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 3, 2025
  2. melvin-bot commented on Dec 3, 2025

    @melvin-bot

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

  3. samranahm commented on Dec 3, 2025

    @samranahm
    Contributor

    Proposal

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

    No autofocus in the name editing menu taxes

    What is the root cause of that problem?

    We're missing the autoFocus here

    <InputWrapper
    InputComponent={TextPicker}
    inputID={INPUT_IDS.NAME}
    label={translate('common.name')}

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

    Add autoFocus param to InputWrapper

    <InputWrapper
    InputComponent={TextPicker}
    inputID={INPUT_IDS.NAME}
    label={translate('common.name')}

    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.

  4. Eskalifer1 commented on Dec 4, 2025

    @Eskalifer1
    Contributor

    Proposal

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

    Tax - No autofocus in the name editing menu taxes

    What is the root cause of that problem?

    We are on this page:

    <InputWrapper
    InputComponent={TextPicker}
    inputID={INPUT_IDS.NAME}
    label={translate('common.name')}
    description={translate('common.name')}
    rightLabel={translate('common.required')}
    accessibilityLabel={translate('workspace.editor.nameInputLabel')}
    maxLength={CONST.TAX_RATES.NAME_MAX_LENGTH}
    multiline={false}
    role={CONST.ROLE.PRESENTATION}
    required
    customValidate={customValidateForName}
    />

    And here is the code of this component:

    return (
    <View>
    <MenuItemWithTopDescription
    ref={ref}
    shouldShowRightIcon={!disabled}
    title={value ?? placeholder ?? ''}
    description={description}
    onPress={showPickerModal}
    furtherDetails={furtherDetails}
    rightLabel={rightLabel}
    brickRoadIndicator={errorText ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined}
    errorText={errorText}
    style={[styles.moneyRequestMenuItem]}
    interactive={interactive}
    wrapperStyle={wrapperStyle}
    numberOfLinesTitle={numberOfLinesTitle}
    titleStyle={titleStyle}
    descriptionTextStyle={descriptionTextStyle}
    />
    <TextSelectorModal
    value={value}
    isVisible={isPickerVisible}
    description={description}
    onClose={hidePickerModal}
    onValueSelected={updateInput}
    disabled={disabled}
    required={required}
    customValidate={customValidate}
    // eslint-disable-next-line react/jsx-props-no-spreading
    {...rest}
    />
    </View>

    The component itself renders the input and already has logic for focusing:

    useFocusEffect(
    useCallback(() => {
    focusTimeoutRef.current = setTimeout(() => {
    if (inputRef.current && isVisible) {
    inputRef.current.focus();
    (inputRef.current as TextInputType).setSelection?.(inputValueRef.current?.length ?? 0, inputValueRef.current?.length ?? 0);
    }
    return () => {
    if (!focusTimeoutRef.current || !isVisible) {
    return;
    }
    clearTimeout(focusTimeoutRef.current);
    };
    }, CONST.ANIMATED_TRANSITION);
    }, [isVisible]),
    );

    <InputWrapper
    ref={inputCallbackRef}
    InputComponent={TextInput}
    value={currentValue}
    onValueChange={(changedValue) => setValue(SafeString(changedValue))}
    // eslint-disable-next-line react/jsx-props-no-spreading
    {...rest}
    inputID={rest.inputID}
    />

    And on all platforms except IOS native, the focus occurs.

    But why doesn't this happen on iOS? I couldn't find any specific article or documentation describing this, but the problem lies in how Fullstory works on iOS. At some point, this library (or the @fullstory/babel-plugin-annotate-react plugin) injects its own ref. As a result, even though we destructured ref here:

    ref,
    ...rest

    And there should be no ref in rest, but at the moment when we pass this rest here:

    We have a ref from FullStory, which overwrites our custom ref and therefore fails the inputRef.current check and no focus occurs.

    We can tell that this is a ref from FullStory by the name of the symbol:
    Image

    For comparison, AmountPicker has the same problem, but first the props are passed destructured and only then ref. Because of this, this bug does not occur there. If you change the order to the same as in TextSelector, this bug will also occur there:

    <NumberWithSymbolForm
    // eslint-disable-next-line react/jsx-props-no-spreading
    {...rest}
    value={currentValue}
    onInputChange={setValue}
    ref={(ref) => inputCallbackRef(ref)}

    I think this is sufficient for RCA, since any deeper explanation would relate to how the library itself works, which is not relevant to this project.

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

    We need to use the same pattern that we use in other parts of the project (such as in AmountSelectorModal), namely passing ref at the end.

                        <InputWrapper
                            InputComponent={TextInput}
                            value={currentValue}
                            onValueChange={(changedValue) => setValue(SafeString(changedValue))}
                            // eslint-disable-next-line react/jsx-props-no-spreading
                            {...rest}
                            ref={inputCallbackRef}
                            inputID={rest.inputID}
                        />

    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.

  5. cretadn22 commented on Dec 4, 2025

    @cretadn22
    Contributor

    Proposal

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

    Tax - No autofocus in the name editing menu taxes

    What is the root cause of that problem?

    we already has logic for focusing, but this logic doesn't work on IOS native

    useFocusEffect(
    useCallback(() => {
    focusTimeoutRef.current = setTimeout(() => {
    if (inputRef.current && isVisible) {
    inputRef.current.focus();
    (inputRef.current as TextInputType).setSelection?.(inputValueRef.current?.length ?? 0, inputValueRef.current?.length ?? 0);
    }
    return () => {
    if (!focusTimeoutRef.current || !isVisible) {
    return;
    }
    clearTimeout(focusTimeoutRef.current);
    };
    }, CONST.ANIMATED_TRANSITION);
    }, [isVisible]),
    );

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

    Passing autoFocus into this place

                       <InputWrapper
                            autoFocus
                            ref={inputCallbackRef}
    

    What alternative solutions did you explore? (Optional)

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Dec 12, 2025
  7. changed the title [-]Tax - No autofocus in the name editing menu taxes[/-] [+][$250] Tax - No autofocus in the name editing menu taxes[/+] on Dec 12, 2025
  8. melvin-bot commented on Dec 12, 2025

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 12, 2025
  10. melvin-bot commented on Dec 12, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External)

  11. 246 remaining items

  12. eVoloshchak commented on Sep 17, 2026

    @eVoloshchak
    Contributor

    Contributor+ Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: This was a bug in a third-party package
      Link to the comment on the Issue:

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: regression wasn't critical

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Test:

    1. Log in and create a new workspace
    2. Open the workspace settings and go to More features
    3. Turn on Taxes
    4. Open the Taxes menu
    5. Tap + Add rate
    6. Tap the Name field
    7. Check that the cursor is already in the name field and the keyboard opens on its own you should be able to type right away without tapping the field again
    8. Go back and tap the Value field check the same thing: cursor ready, keyboard open

    Do we agree 👍 or 👎

  13. eVoloshchak commented on Sep 17, 2026

    @eVoloshchak
    Contributor

    @TaduJR, looks like this caused 3 regressions, is that correct?

  14. TaduJR commented on Sep 17, 2026

    @TaduJR
    Contributor

    @eVoloshchak

    Yes but the regression was from upstream not from us.

  15. melvin-bot commented on Sep 18, 2026

    @melvin-bot

    @mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  16. mallenexpensify commented on Sep 20, 2026

    @mallenexpensify
    Contributor

    Claude posting on behalf of Matt:

    $75 to @TaduJR (Contributor) and $75 to @eVoloshchak (Contributor+). 25% of the $250 job price, the regression floor.

    PR #99757 by @TaduJR, merged 2026-09-08. 5 files, +31 / -80
    Contributor @TaduJR, $75 via Upwork. Needs a manual offer, the automatic offer in the OP is stale for @samranahm
    Contributor+ @eVoloshchak, $75 via NewDot
    Job price $250, from the title
    Reduction 25%. Each confirmed regression cuts 50% and the cuts compound, with a floor at 25%
    Increase None. 5 files and +31 lines meet no threshold, and regression work cannot support an increase
    Blockers #92210, confirmed here. #97099 caused the revert of #95917. Two reaches the floor, so the rest cannot change the amount
    Precedent 97231 paid 25% on four regressions
    Needs a ruling No. The revert and its regression are one cut, applied once. 4 fix PRs from @TaduJR, under the five-PR gate; the 3 revert PRs are not payable work

    Claude posting on behalf of Matt. PAYRUBRICTEST v2

  17. TaduJR commented on Sep 20, 2026

    @TaduJR
    Contributor

    Not sure if the regressions cut is applicable here. Both reverts were causes by upstream design flaws. Actually this issue was complex requiring a fix from Upstream. It could have been $500 but I left it because of the reverts. $250 is fine imo wdyt @flodnv

    Thanks

  18. flodnv commented on Sep 21, 2026

    @flodnv
    Contributor

    I agree with $250

  19. mallenexpensify commented on Sep 21, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @TaduJR paid $250 via Upwork
    Contributor+: @eVoloshchak due $250 via NewDot

    @TaduJR can you please accept the job below? Please reply here and tag me once you have.

    https://www.upwork.com/jobs/~022102132141262506132

    Is @samranahm due payment? They were assigned early on. Thx

  20. samranahm commented on Sep 21, 2026

    @samranahm
    Contributor

    Is @samranahm due payment? They were assigned early on. Thx

    @mallenexpensify No, I’m not due a payment here. We decided to go with @TaduJR’s proposal after I get assigned.
    Could you please delete this offer from Upwork? #76650 (comment)

  21. mallenexpensify commented on Sep 21, 2026

    @mallenexpensify
    Contributor

    @samranahm contract closed with zero payment, I checked 'contract not needed anymore' option.

  22. mallenexpensify commented on Sep 26, 2026

    @mallenexpensify
    Contributor

    @TaduJR paid, apologies, I think I used the wrong snippet

  23. JmillsExpensify commented on Sep 30, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @eVoloshchak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions