[HOLD for payment 2021-11-29] $500 Old Edited comments that are still open trigger the keyboard when the user is scrolling the conversation - Reported by: @parasharrajat
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:
- Open any chat.
- Scroll back in the history.
- Edit the message. Leave it as it is. Don't close the editor
- Go back to LHN.
- Open any other chat.
- back to LHN.
- Open back the previous chat.
- Scroll back in the list slowly.
- Screen will jump to the message being edited as soon as you reach closed to it.
Expected Result:
Old edited comment that are still open should not trigger the keyboard when the user is scrolling.
Actual Result:
Old Edited comments that are still open trigger the keyboard when the user is scrolling the conversation
Workaround:
Close or save the comments that are being edited.
Platform:
Where is this issue occurring?
- iOS
- Android
Version Number: 1.1.8-0
Reproducible in staging?: Yes Reproducible in production?: Yes
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/44479856/137535354-b90dfc55-59f2-4645-9ca9-d8441984030e.mp4
Expensify/Expensify Issue URL:
Issue reported by: @parasharrajat Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1633794986065800
Triggered auto assignment to @thienlnam (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Triggered auto assignment to @SofiedeVreese (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Video
https://user-images.githubusercontent.com/24370807/137549442-cbcc1e10-3121-447e-9ad9-ca53231389b2.mp4
Posted on Upwork: https://www.upwork.com/jobs/~018f79ec6f97efcf87
Adding Exported Label.
Triggered auto assignment to @NikkiWines (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Hmm this is kind of an interesting edge case... I think how we fix this depends on how we want to handle moving away from a chat with an active edit. Posted in #expensify-open-source here to get some thoughts on how to move forward.
I think, Keyboard should only open when the user clicks to edit a message aka User action trigger.
Hey @NikkiWines is this a dupe from https://github.com/Expensify/App/issues/4756 that has been reopened? Feels like this case would fall under that other GH?
mmm, I'd say they're related but not sure if they're exactly the same issue. In this one, it's more that navigating back to this chat and scrolling over an old open message will retrigger keyboard to pop up.
They are completely different. This => explained above. #4756 => has to do with draft messages.
Thanks for the explanation both, we'll keep this issue open then!
Price increased to $500
Proposal
AFAIK, I think there is only one way we can keep both autofocus and fix this issue. If we only autofocus, when the user edits messages (trigger edit action). Then old message being edited will not be focused when the user is scrolling. I think this is ideal behaviour as well.
If the user is scrolling back in the history, he should click on the edit box to focus it, instead of autofocus. But if a user press edits on any message, then it should be autofocused.
To do this:
- Straight way to do this would be to capture the edit trigger in
ReportActionItemvia.
componentDidUpdate(prevProps) {
if (!prevProps.draftMessage && this.props.draftMessage) {
// eslint-disable-next-line react/no-did-update-set-state
this.setState({isMessgeEdited: true});
}
}
Then pass the Autofocus prop to ReportActionItemMessageEdit which will control the autofocus on underlined text input.
I think that makes sense. cc: @SofiedeVreese would you hire @parasharrajat for this one?
Yes sure can @NikkiWines.
@parasharrajat can you submit your Upwork proposal so I can hire you there? Thanks!
@SofiedeVreese Job is private.
@parasharrajat that should work better now! https://www.upwork.com/jobs/~018f79ec6f97efcf87
I've just hired you in Upwork @parasharrajat !
PR merged and QA ongoing.
PR deployed, adding a payment hold 7 days from deploy.