-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 - Create room - Inconsistent behavior of cursor after selecting workspace/visibility #31224
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01fbab8ee06aa1521a |
Triggered auto assignment to @sakluger ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh ( |
The workspace/visibility is a modal, so the focus will be restored once the modal is closed. I think we should hold this for #24452 (comment) |
That other issue is related to Composer only, and only there we have the "the focus will be restored once the modal is closed" behavior. Here we should dismiss the keyboard when modal opens like the Expected suggested, because when the user goes to workspace/visibility step, it's most likely they already completes entering the room name and there's no need to refocus on the room name input. ProposalPlease re-state the problem that we are trying to solve in this issue.On Android and iOS, the cursor returns to the room name, and the field is highlighted, while on web and mweb, the cursor is not seen, and the keyboard is hidden on mweb. Also, the keyboard is hidden on Samsung s10+, while it appears on Pixel 6.
This part is out of scope and I believe we already have another ticket to remove that. What is the root cause of that problem?In iOS and some Android devices, if a modal is opened while a keyboard is open, the keyboard will be dismissed natively but will resurface after the modal is closed. It's native behavior. While for web/mWeb it doesn't have that behavior. What changes do you think we should make in order to solve the problem?We need to proactively dismiss the keyboard before the modal opens. We can do that by making use of the
We use Then we can use the hook in the What alternative solutions did you explore? (Optional)We can add If instead we want to autofocus whenever the modal closes, we can implement similarly in the |
(image taken from #24452 (comment))
AFAICT, it will be applied to all Modal.
They also plan to add |
I think for dismissing (and not restoring keyboard) for Modal, my proposal is much more simple and better than all that's being discussed in the other issue. The other issue should focus on handling the refocusing which applies for |
I agree with @tienifr that this is an issue and it's not enough to wait for the user to close the modal. Although I don't really understand how this is related to #24452 (comment), the issue that @bernhardoj references. @hoangzinh I'm curious for your thoughts here. Do you think we should go with @tienifr's proposal, or would it be better to hold? |
@sakluger There are a lot of conversations in #24452, and they end up with extending the scope of that issue to not only fix in chat reports but also in all pages having modals #24452 (comment).
If this point is implemented, I think we should put this issue on hold, otherwise, we will do duplicate work with them. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@sakluger, @hoangzinh Still overdue 6 days?! Let's take care of this! |
Okay, we'll put on hold for #24452 and revisit once that is complete. |
Thanks @hoangzinh. I switched to Monthly, and also added to the vip-vsb project since it has to do with chat functionality. |
Still on hold for #24452. |
The solution for the hold issue was deployed to prod last week, but I can still reproduce the issue on iOS v1.4.80-17. @hoangzinh should we open this issue back up for new proposals? |
Yes @sakluger cc @bernhardoj @tienifr just in case you're still interested in fixing this issue |
Thanks @bernhardoj. I asked in that issue too, but do you know which PRs are still pending? |
I don't see any open PR, but based on this comment, they are trying to split it into 4 phases and the 2nd phase is already completed. |
Hi, I think this is one of the situations in the general modal focus case. onBackdropPress={onBackdropPress}
+ shouldEnableNewFocusManagement
+ restoreFocusType="delete" However, it's worth noting that there is an issue with Here is the final result: demo.mp4We could also consider hiding the keyboard earlier in the If you all agree with these thoughts, I think we don't need to hold this issue any longer. It would be great if a contributor is willing to raise a PR to fix this issue. I'm happy to share some information and, of course, still remain open to different opinions. 😄 |
Thanks for your suggestion @ntdiary. I will try to check it. |
It sounds like the remaining parts of the hold issue won't solve this, so I've added the help wanted label back. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Hi @ntdiary is there any reported issue in react-native-modal or it's just what you found during phases 1 & 2 in your issue? Thank you. |
@hoangzinh, It's only what I found while testing my PR. As for |
I'm not an engineer so I can't really evaluate how good that solution is 🙂. @hoangzinh feel free to C+ approve the proposal so we can get a BE engineer assigned to confirm. Thanks! |
Sure @sakluger. |
After retesting, I found that the behavior on all platforms now is the same. The room name field is refocused after selecting the workspace visibility because of the focus trap. |
Thanks for retesting it @bernhardoj. I confirmed that the above behavior is consistent between mWeb and native atm. cc @sakluger should we close this issue? Screen.Recording.2024-06-18.at.16.45.43.mov |
Thanks @bernhardoj for retesting! Yes, let's close this out. |
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: 1.3.98.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:
Expected Result:
The cursor is not shown, and the keyboard is hidden
Actual Result:
On Android and iOS, the cursor returns to the room name, and the field is highlighted, while on web and mweb, the cursor is not seen, and the keyboard is hidden on mweb. On iOS, the keyboard overlaps the "Create room" button. Also, the keyboard is hidden on Samsung s10+, while it appears on Pixel 6.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6271875_1699653421342.Android_pixel6.mp4
View all open jobs on GitHub
Bug6271875_1699653421346.iOS.mp4
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: