-
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] Different behavior for mobile and mWeb when user opens an attachment and tries to go back - Reported by @thesahindia #7010
Comments
Triggered auto assignment to @stitesExpensify ( |
Yep definitely a bug. @thesahindia do you want to propose a solution? |
Triggered auto assignment to @NicMendonca ( |
Upwork job post: https://www.upwork.com/jobs/~0167b446c2be6b25f4 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
Triggered auto assignment to @roryabraham ( |
My proposal:There is a code block that shows the image thumbnail until the image is loaded. From my point of view, it could show File: Before:
After
Review: ios_issue7010.mp4 |
First of all, Same behavior should be across platforms does not tell at all what is the expected behavior. Could we please pay more attention while creating the issue or during issue triaging? cc: @mallenexpensify @NicMendonca @phivh I think you misunderstood the issue.
which says that we want the user to land on Chat page for both Native Mobile and Mobile web. |
IMO the expected behavior is that the user ends up back at the chat. Do you agree @NicMendonca ? |
Yep, I agree with that 👍 |
@phivh do you have any questions after reading @parasharrajat's feedback? |
@NicMendonca Nope, I will look again the navigation, then give a proposal if I have. |
Doubled the price to $500: https://www.upwork.com/jobs/~0167b446c2be6b25f4 |
I have done some research on this and it seems that the solution will be complicated and it requires hacks. There is no default way of doing this using browser technologies.
Based on the discussion necolas/react-native-web#1738. RN-web authors considers this behavior hacky and will not implement it in their repo. Nor this can be considered a part of react-native-modal repo as it depends on BackHandler or onClose event on Modal component. Thus if RN-web implements this onClose for Modal then it will start working. In Short, popstate event can not be canceled or prevented so it requires hacks to overcome this. So, I suggest we close this as it is an edge case and most of the mobile-web users would be used to closing modal via the cross button. |
@parasharrajat Understand your point. I also checked this issue and trying with window popstate listener and it seems tricky for now but at least somehow it works but not perfectly. I have an idea from my mind. Let me try to add a hash when view image modal open then will see what happen. I will show you guys then. |
@stitesExpensify @roryabraham you two cool with closing this based on Rajat's reasoning above? |
I'm fine with closing this. @roryabraham can have the final call |
Yeah, I'm fine with keeping things simple and closing this. I like keeping things consistent where possible, but in this case we can consider it a platform limitation. It's not a severe bug either, just a mild inconsistency. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a production regression has occurred a Root Cause Analysis is required. Please follow the instructions here. 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. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Same behavior should be across platforms
Actual Result:
Different behavior for mobile and mobile web when the user opens an attachment and tries to go back using the native back button.
Mobile :- The user go back to the chat.
Mobile web :- The chat closes itself.
Workaround:
Unknown
Platform:
Where is this issue occurring?
Version Number: 1.1.24-0
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Screen.Recording.2021-12-25.at.1.35.57.AM.mov
Screen.Recording.2021-12-25.at.1.35.22.AM.mov
Expensify/Expensify Issue URL:
Issue reported by: @thesahindia
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1640376771111300
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: