Skip to content
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

[$500] Android - IOU-From BNP page, tap next and navigate back, phone keypad opens #30511

Closed
1 of 6 tasks
izarutskaya opened this issue Oct 27, 2023 · 58 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@izarutskaya
Copy link

izarutskaya commented Oct 27, 2023

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: 1.3.92-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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation: @

Action Performed:

  1. Launch app
  2. Tap fab
  3. Tap request money
  4. Enter an amount
  5. Tap next
  6. Tap app's back button

Expected Result:

When user taps app's back button, phone keypad must not open.

Actual Result:

When user taps app's back button, phone keypad opens.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Android: Native
Bug6253269_1698410326558._eypad.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c70a484f8520ecd4
  • Upwork Job ID: 1717893710590554112
  • Last Price Increase: 2024-01-02
@izarutskaya izarutskaya added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 27, 2023
@melvin-bot melvin-bot bot changed the title Android - IOU-From BNP page, tap next and navigate back, phone keypad opens [$500] Android - IOU-From BNP page, tap next and navigate back, phone keypad opens Oct 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01c70a484f8520ecd4

@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

Triggered auto assignment to @conorpendergrast (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

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

@manlaig
Copy link

manlaig commented Oct 27, 2023

Proposal

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

Keyboard is focused on Android when navigating back to screen.

What is the root cause of that problem?

When disableKeyboard prop is enabled on TextInput, an AppState listener dismisses the keyboard on background or inactive events. It doesn't dismiss the keyboard on active event.

if (!props.disableKeyboard) {
return;
}
const appStateSubscription = AppState.addEventListener('change', (nextAppState) => {
if (!nextAppState.match(/inactive|background/)) {
return;
}
Keyboard.dismiss();
});

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

Remove the conditional check inside the event callback that prevents dismissing the keyboard on active event. So, the listener would dismiss the keyboard on all AppState event changes and also initially dismiss the keyboard.
The code would look like:

    if (!props.disableKeyboard) {
        return;
    }
    Keyboard.dismiss();

    const appStateSubscription = AppState.addEventListener('change', (nextAppState) => {
        Keyboard.dismiss();
    });

What alternative solutions did you explore? (Optional)

Since we don't need the keyboard when disableKeyboard is set, removing the conditional check simplifies the code and initially calling dismiss prevents bugs like this. I think this is a general solution that will address similar keyboard bugs in the future.

@wlegolas
Copy link
Contributor

wlegolas commented Oct 27, 2023

Proposal

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

Android - IOU-From BNP page, tap next and navigate back, phone keypad opens

What is the root cause of that problem?

The problem is related to how quickly the user clicks on the back button or the slowness of the application when the user switches from the Participants view to go back to the Request Money page.

When the user clicks on the "Next" button to select the Participants we can see this behavior when:

  • The Participants screen takes time to load and the user clicks on the back button
  • Or when the user clicks quickly on the back button until the participant view is showing

As the text field in the Participant view receives the focus, the keyboard will be shown because it's an expected behavior for native devices, but this time the navigation is changing to the Request Money Page, this is the reason to see the keyboard open.

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

We need to change the Native input to add the logic to subscribe to the blur event from the Navigation and when the blur event occurs we need to call Keyboard.dismiss() to close the keyboard and change its state to close.

For example:

const TextInput = forwardRef((props, ref) => {
    const navigation = useNavigation();

    useEffect(() => {
        const unsubscribe = navigation.addListener('blur', () => {
            Keyboard.dismiss();
        });

        return unsubscribe;
    }, [navigation]);

    ...
});

What alternative solutions did you explore? (Optional)

N/A

POC

poc-issue-30511.mov

@s77rt
Copy link
Contributor

s77rt commented Oct 28, 2023

Is there any specific requirements to reproduce this bug? Works fine from my end

Screen.Recording.2023-10-28.at.10.31.57.AM.mov

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2023
@conorpendergrast
Copy link
Contributor

I can't reproduce via Browserstack either, I get the regular in-app keyboard:

image

@melvin-bot melvin-bot bot removed the Overdue label Oct 30, 2023
@conorpendergrast
Copy link
Contributor

@izarutskaya could you confirm if there's any extra information needed for reproduction? Is this specific to one particular Android device?

@melvin-bot melvin-bot bot added the Overdue label Nov 2, 2023
@s77rt
Copy link
Contributor

s77rt commented Nov 2, 2023

Not overdue. Still requires bug reproduction confirmation

@melvin-bot melvin-bot bot removed the Overdue label Nov 2, 2023
Copy link

melvin-bot bot commented Nov 3, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@izarutskaya
Copy link
Author

izarutskaya commented Nov 4, 2023

@conorpendergrast I can't reproduce this anymore. Build - 1.3.95-2

Screen.Recording.20231104.135822.New.Expensify.mp4

@melvin-bot melvin-bot bot added the Overdue label Nov 6, 2023
@s77rt
Copy link
Contributor

s77rt commented Nov 6, 2023

I think we can close this @conorpendergrast

@melvin-bot melvin-bot bot removed the Overdue label Nov 6, 2023
@conorpendergrast
Copy link
Contributor

I agree, based on none of us being able to reproduce any more. Thanks for raising this @izarutskaya !

@lanitochka17
Copy link

Issue reproducible on latest build 1.4.1-5

Issue found when executing PR #30873

ul.mp4

viber_image_2023-11-20_12-19-59-859 (1)

@lanitochka17 lanitochka17 reopened this Nov 20, 2023
Copy link

melvin-bot bot commented Dec 18, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Dec 18, 2023
@s77rt
Copy link
Contributor

s77rt commented Dec 18, 2023

Not overdue. Still not sure how to proceed though, it's either we fix this at Android or close the issue since we can't do much about it (/App perspective)

@melvin-bot melvin-bot bot removed the Overdue label Dec 18, 2023
Copy link

melvin-bot bot commented Dec 19, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Dec 20, 2023
@s77rt
Copy link
Contributor

s77rt commented Dec 20, 2023

Asking in Slack if this can be closed https://expensify.slack.com/archives/C01GTK53T8Q/p1703083456350169 (low priority)

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 20, 2023
@s77rt
Copy link
Contributor

s77rt commented Dec 25, 2023

Not overdue. Waiting on Slack input

@melvin-bot melvin-bot bot removed the Overdue label Dec 25, 2023
Copy link

melvin-bot bot commented Dec 26, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Dec 27, 2023
@s77rt
Copy link
Contributor

s77rt commented Dec 27, 2023

Same ^

@melvin-bot melvin-bot bot removed the Overdue label Dec 27, 2023
@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@melvin-bot melvin-bot bot added the Overdue label Dec 31, 2023
@s77rt
Copy link
Contributor

s77rt commented Dec 31, 2023

Not overdue. Not expecting much in Slack thread this week. Will bump the thread next week

@melvin-bot melvin-bot bot removed the Overdue label Dec 31, 2023
Copy link

melvin-bot bot commented Jan 2, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Jan 2, 2024
@s77rt
Copy link
Contributor

s77rt commented Jan 3, 2024

Same ^

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 3, 2024
@s77rt
Copy link
Contributor

s77rt commented Jan 6, 2024

Bumped the slack thread

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 6, 2024
@conorpendergrast
Copy link
Contributor

I've replied in Slack, sorry that took so long! Based on that, I'll close out. If any disagrees, add a comment!

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 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

9 participants