-
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
[WAITING ON SLACK] [$1000] ANDROID CHROME - Missing focus when going from LHN to the conversation page #23382
Comments
Triggered auto assignment to @jliexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.When clicking on a chat in the sidebar, the focus is not anymore shown. What is the root cause of that problem?This is actually the normal behavior of ReactDOM. The focus event listener is triggered automatically when clicking anywhere in the 'document'. This causes the focus to clear itself from the composer and tries to focus where we have the mouse clicked event. The lines of code that trigger the click event on the OptionRowLHN or Chat is in the SidebarLinks file where we navigate to the report and open it when we click: App/src/pages/home/sidebar/SidebarLinks.js Lines 148 to 157 in f235a45
Dealing with the composer in independent of openingReport request and Report rendering component. We can't pass something to let the composer present here that it needs to be focused. App/src/pages/home/report/ReportActionCompose.js Lines 1138 to 1162 in f235a45
Thus, the solution here is that we can work it out through the ReportActionComposeFocusManager that keeps track of the focusCallback. When navigating to the selected report, we can add the focus listener to the compose which will keep it on! In addition, another reason here is the we are re-navigating to report when we click on the chat as well. This is causing the component to update one again and loosing the focus, so we can manually trigger it to focus again *Will discuss it in the alternative solutions. What changes do you think we should make in order to solve the problem?In this part of the SidebarLinks: App/src/pages/home/sidebar/SidebarLinks.js Lines 148 to 157 in f235a45
We need to add: I hope I made it as clear as possible for you! ResultbugFocus.webmWhat alternative solutions did you explore? (Optional)As I stated above, we can handle this as well from the component when it is updated in React, we can trigger it to focus once again in here: App/src/pages/home/report/ReportActionCompose.js Lines 273 to 291 in e87ba56
We can add |
Yep, I can replicate it on 1.3.44.0 (Android Chrome, Pixel 3a). The behaviour on Mac OS is that the cursor re-appears when you navigate back into the same compose field in the same chat. |
Job added to Upwork: https://www.upwork.com/jobs/~01256fc687c8baf62f |
Current assignee @jliexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan ( |
Hey guys I think I have reported this issue long ago here |
Is it good UX to automatically open the keyboard on mobile, which takes up a large chunk of the screen? The first thing the user probably wants to do is read the messages, rather than replying (which feels like should be an explicit action) that now we're kind of forcing onto the user. |
@Nathan-Mulugeta - thanks for letting me know! @situchan - let me bring this one up internally. I reviewed Nathan's bug report and Matt closed it as not being a bug, but my understanding is our behaviours should be the same across all platforms. I think this is a bug since we can see the behaviour on Mac OS, but I'll circle back with a final response. |
Still awaiting consensus |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Sorry, not overdue - we're discussing auto-focusing in Slack. Catching up on the threads today. |
@situchan just curious: does Android support auto-focusing in this particular instance (i.e. the chat composer)? |
yes, it should be auto-focused when open new (no chat history yet) report |
@situchan as an FYI, I've posted publicly here - https://expensify.slack.com/archives/C01GTK53T8Q/p1690436065927919 It looks like we never really defined the rules around auto-focus so I was trying to get consensus around it. Feel free to review! |
@Nathan-Mulugeta @situchan - sorry for the delay: we're going to close this one as both iOS and Android don't intentionally auto-focus on the chat composer, and we want to keep it this way. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Another scenario
Expected Result:
While navigating from LHN to chat page, focus on compose box, with cursor and keypad must be shown
Actual Result:
While navigating from LHN to chat page, no focus on compose box, no cursor and no keypad displayed
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.44.0
Reproducible in staging?: Yes
Reproducible in production?: Yes
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
Notes/Photos/Videos: Any additional supporting documentation
Bug6129109_aa_compress_1.mp4
Bug6129109_cursor.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: