-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Compose box is not cleared after sending a message if the user starts typing just after pressing send - iOS / Android #4129
Comments
Triggered auto assignment to @robertjchen ( |
I was able to reproduce this behavior in the iOS emulator. Interestingly enough, it doesn't seem to be an issue on the Web-based client. After unsuccessfully trying some quick JS changes, I think the potential solution might have to involve low-level, native control of the input field behavior. Opening it up for others to try tackling it, perhaps a more suitable JS solution can be found! 👍 |
Triggered auto assignment to @bfitzexpensify ( |
This comment has been minimized.
This comment has been minimized.
Triggered auto assignment to @marcaaron ( |
the problem seems to be related to state management |
I can easily fix this; it seems to be the problem because the input field is not controlled. (state management problem) My Upwork profile: https://www.upwork.com/freelancers/~014e072a4daf3ed991 |
@muratti32 How so?
@sonipranjal We had a controlled input used in the past. The performance was very bad. |
If it helps, here's where we clear the comment by calling this method with an empty string App/src/pages/home/report/ReportActionCompose.js Lines 419 to 420 in fa35541
App/src/pages/home/report/ReportActionCompose.js Lines 303 to 311 in fa35541
I'm not certain, but if I had to guess there's some conflict between the logic that is doing
|
Proposal We can try running the submitting after clearing the textField.
|
@mananjadhav Interesting, is there some explanation for why this would help? |
we update the submitForm in "src/pages/home/report/ReportActionCompose.js" |
@marcaaron, @bfitzexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick! |
I would try to clear input first and then trigger the send message functionality. clearing input is a state update so it should not affect the sending message time. and yes updating the state is the only solution I see here, there can be problem with re-rendering and we can optimise the component to avoid re-render by making some components |
once it submit the message from state, we just need to clear/empty state again. |
Thanks for everyone's input. Based on the complexity of the solutions suggested and lack of a clear solution we're going to take some time to investigate this internally before proceeding. Please let us know in the Slack channel if any new ideas pop up. |
Job closed in Upwork |
This issue has not been updated in over 15 days. eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
@isagoico, this Monthly task hasn't been acted upon in 6 weeks; closing. If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead. |
This is still happening on v1.1.18-3, iOS. I'm reopening cuz it's a bug and we should fix it, sooner or later. |
@isagoico, this Monthly task hasn't been acted upon in 6 weeks; closing. If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead. |
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:
Expected Result:
Compose box should be cleared after sending the message
Actual Result:
Previous message is still in compose box if the user starts typing just after pressing send
Workaround:
Waiting a bit after pressing send clears the compose box. But this could be a pain for fast typers.
Platform:
Where is this issue occurring?
Web
iOS ✔️
Android ✔️
Desktop App
Mobile Web
Version Number: 1.0.79-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Screen.Recording.2021-07-15.at.12.47.54.PM.mov
Expensify/Expensify Issue URL:
View all open jobs on Upwork
From @aliabbasmalik8 https://expensify.slack.com/archives/C01GTK53T8Q/p1626378713340800 and @joaniew https://expensify.slack.com/archives/C01GTK53T8Q/p1626387085365100
IMPORTANT PLEASE READ
Instructions on how to make a proposal for this issue:
Proposals without this information will be marked as off-topic. Thanks!
The text was updated successfully, but these errors were encountered: