-
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
[HOLD for payment 2024-12-17] [HOLD for facebook/react-native#46411[$250] iOS - Chat - Composer not auto scrolled to the bottom when editing message with 10 line breaks #48122
Comments
Triggered auto assignment to @deetergp ( |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
Production: Bug6584462_1724784043018.prod.mp4 |
Nothing in the deploy checklist jumps out at me as the cause of this. But I also think it isn't significant enough to block on, so I am going to remove the blocker label, set to Daily, and make it External. |
Job added to Upwork: https://www.upwork.com/jobs/~01c809bc476538a5ae |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra ( |
Triggered auto assignment to @VictoriaExpensify ( |
@MrRefactor @WoLewicki Can you please look into this? |
I will use a combination of ref and the setNativeProps method to programmatically set the cursor position. |
📣 @bigshoesdev! 📣
|
ProposalPlease re-state the problem that we are trying to solve in this issue.iOS - Chat - Composer not auto scrolled to the bottom when editing message with 10 line breaks What is the root cause of that problem?We do not wrap the compose text input inside the ScrollView and we do not auto scroll to the end inside the input What changes do you think we should make in order to solve the problem?We can wrap the compose input inside the ScrollView and link the ScrollView to useRef and invoke the scrollEnd function What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Compose box is not auto scrolled to the end of the message, 6th is the last line visible to the user What is the root cause of that problem?This issue happen on native TextInput in iOS, but not Android. The reason is because in Android, when we set Unfortunately, we don't have the same mechanism in the iOS. We only call What changes do you think we should make in order to solve the problem?Based on this: facebook/react-native#38679, we can add a function in - (void)scrollCursorIntoView {
// Assuming you have a UITextView or similar text input view
UITextRange *selectedRange = _backedTextInputView.selectedTextRange;
// Updating the UITextView attributedText, for example changing the lineHeight, the color or adding
// a new paragraph with \n, causes the cursor to move to the end of the Text and scroll.
// This is fixed by restoring the cursor position and scrolling to that position (iOS issue 652653).
if (selectedRange.empty) {
// Maintaining a cursor position relative to the end of the old text.
NSInteger offsetStart = [_backedTextInputView offsetFromPosition:_backedTextInputView.beginningOfDocument
toPosition:selectedRange.start];
[_backedTextInputView scrollRangeToVisible:NSMakeRange(offsetStart, 0)];
}
} And add the calls when the text view is being auto focused or focused programmatically here ....
[_backedTextInputView becomeFirstResponder];
[self scrollCursorIntoView];
.... What alternative solutions did you explore? (Optional) |
Asked for 2nd opinion here https://expensify.slack.com/archives/C066HJM2CAZ/p1725018537186099 |
@dominictb Can you create an upstream PR to fix this? |
@shubham1206agra Please review the PR: #53566 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.73-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-12-17. 🎊 For reference, here are some details about the assignees on this issue:
|
@shubham1206agra / @dominictb @VictoriaExpensify @shubham1206agra / @dominictb The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalTest:
Do we agree 👍 or 👎 |
@deetergp, @VictoriaExpensify, @shubham1206agra, @dominictb Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Ready for payment. |
Hey @shubham1206agra 👋 @VictoriaExpensify was OOO this week but will be back on Monday and will process payment then. |
@shubham1206agra 's offer had expired and I couldn't reissue it under the old job posting as that has also expired. So I have created a new job posting and issued you both new offers @shubham1206agra and @dominictb - can you please accept these so I can process your payments? |
@deetergp, @VictoriaExpensify, @shubham1206agra, @dominictb Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@deetergp, @VictoriaExpensify, @shubham1206agra, @dominictb Still overdue 6 days?! Let's take care of this! |
This is ready for payment |
Payment summary: Contributor: @dominictb paid $250 via Upwork |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.25-8
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4895266
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Compose box should be auto scrolled to the bottom of the message, the end of the message should be visible.
Cursor should be placed at the end of the message
Actual Result:
Compose box is not auto scrolled to the end of the message, 6th is the last line visible to the user
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6584462_1724784043034.staging.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @VictoriaExpensifyThe text was updated successfully, but these errors were encountered: