-
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
[$250] Android - Chat - When context menu is closed, keyboard doesn´t open again #52390
Comments
Triggered auto assignment to @Christinadobrzyn ( |
Job added to Upwork: https://www.upwork.com/jobs/~021856600731292480706 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
Oh this is a good one - I think this can be external since it's affecting multiple platforms. |
Edited by proposal-police: This proposal was edited at 2024-11-15 11:50:54 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Android - Chat - When context menu is closed, keyboard doesn´t open again What is the root cause of that problem?The keyboard is dismissed because the popup menu's appearance does not cause the input to lose focus; when the popup menu disappears, the input is still focused. What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)Resultscreencast-Genymotion-2024-11-14_02.29.56.567.mp4Reminder: 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. |
hi @jjcoffee can you check on the above proposal when you have a moment? TY! |
Proposal |
I have checked that this issue behaves the same way as when the user presses the physical back button while the keyboard is open/shown and, based on react native official documentation, it is a known issue for Android. |
I actually can't reproduce on latest main, are you still able to reproduce @Pholenk? issue-52390-test-2024-11-15_14.25.11.mp4@Christinadobrzyn Can we ask for a retest? |
I am still able to reproduce after syncing my fork and using the fresh install version @jjcoffee screencast-Genymotion-2024-11-15_22.52.48.168.mp4 |
I tested again on Google Pixel 6 Pro 13.0 NewDot version 9.0.60-0. it looks like the keyboard is not opening on Step 7 (of the OP) screenRecording-18-11-2024-10-3.mp4 |
Hmm strange, I can't reproduce it at all (using @Pholenk I don't think I can accept the RCA in your proposal without it dealing with why the bug is not happening consistently. |
If that's the case, have you tried with the lower API such as 33 or lower @jjcoffee? I tried with a newly created account, latest version of main branch, and this issue is still there. |
@Pholenk Ah yes, I can reproduce it now on API 33, thanks for the tip! Can you explain why that is? |
You're most welcome @jjcoffee.
As far as I know, this happened because of this known issue of the text input focus. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@kirillzyusko Any update on this? |
Hi @kirillzyusko I'm going to add you to this GH for tracking - can you provide an update for us? TY! |
@jjcoffee no, not yet, sorry. I was busy (and I'm still busy) with resolving some urgent deploy blockers 😔 Hopefully we can squash all of them soon and I'll get back to all issues that I was assigned to! |
@kirillzyusko, @jjcoffee, @Christinadobrzyn Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Just checking in on this @kirillzyusko - if you have an update on the status of working on this that'd be great! TY! |
@kirillzyusko @jjcoffee @Christinadobrzyn this issue is now 4 weeks old, please consider:
Thanks! |
@kirillzyusko, @jjcoffee, @Christinadobrzyn Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Not overdue - just waiting for @kirillzyusko to get a chance to look into this 🙏 |
Looking into it right now 👀 |
Okay, the problem is present in Android itself. iOS and Android have a different behavior in terms of restoring keyboard state after Modal dismissal: iOS will show a keyboard again, but Android may not show keyboard again (depends on Android version, Android 14-15 shows the keyboard again when Modal gets hidden, Android 13 doesn't do that by default). The solution would be to force show a keyboard on Android to match the iOS behavior, however:
const shouldRestoreFocus = useRef(false);
useEffect(() => {
if (isVisible) {
shouldRestoreFocus.current = Keyboard.isVisible();
}
if (!isVisible && shouldRestoreFocus.current) {
InteractionManager.runAfterInteractions(() => {
KeyboardController.setFocusTo("current");
});
}
}, [isVisible]); I put this code into The key difference in the code that I propose is that:
@jjcoffee curious to know your thoughts 🙌 |
@kirillzyusko That sounds like a good, clean solution to me - I also like the idea of moving it into a reusable hook. Let's do it! 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @aldo-expensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
PR merged |
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.60-0
Reproducible in staging?: Y
Reproducible in production?: Y
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/5204110&group_by=cases:section_id&group_order=asc&group_id=292106
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
When the context menu is closed, keyboard should be displayed again.
Actual Result:
After the context menu is closed, keyboard is not opened again, despite compose box being focused.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6662106_1731387510202.Context.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @ChristinadobrzynThe text was updated successfully, but these errors were encountered: