-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$250] Room - Pasting long text in description not scrolled to bottom & cursor shown at middle. #45885
Comments
Triggered auto assignment to @mallenexpensify ( |
We think this issue might be related to the #vip-vsb |
Edited by proposal-police: This proposal was edited at 2024-08-13 07:50:10 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Pasting long text in description not scrolled to bottom What is the root cause of that problem?In the private notes page, we use useHtmlPaste on the input ref, which handles moving the cursor when pasting from clipboard. however we don't do that in the description page What changes do you think we should make in order to solve the problem?To ensure consistency, we should call the We can also do that in other places if needed. alternativelyFor a global solution, we can use the Another solutionOR more specifically since the issue occurs when the |
ProposalPlease re-state the problem that we are trying to solve in this issue.Pasting long text in description not placing cursor at end of text What is the root cause of that problem?Cursor positon is not corrected while pasting text similar to Composer text field. What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)N.A. |
@mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@mallenexpensify : I would like to work on this issue, based on previous work in this area. Please assign this to me. |
@mallenexpensify Still overdue 6 days?! Let's take care of this! |
Job added to Upwork: https://www.upwork.com/jobs/~013fba32c1ac87d746 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr ( |
@mollfpr can you review @kpadmanabhan proposal above and the issues I linked above too? |
this proposal is the same as mine ... can u please let me know your opinion about my proposal? |
I agree that the @kpadmanabhan solution is the same as the @abzokhattab proposal. It seems using |
Updated Proposal: added an alternative solution |
@abzokhattab : didnt notice your proposal earlier. sorry for that. @mollfpr : according to me |
@mallenexpensify @mollfpr this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@mallenexpensify, @mollfpr Huh... This is 4 days overdue. Who can take care of this? |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Hello, I decided to investigate this issue more inside the library since I have more capacity. To fix this issue and overall scrolling into view logic, we have to make some bigger logic changes inside the library. First of all, we don't need to scrollIntoView on every input change or event. We can do it only on the actions that were totally replaced by our custom implementation, like: After that, we can update our const selection = window.getSelection();
if (selection && selection.rangeCount > 0) {
const range = selection.getRangeAt(0);
const caretRect = range.getBoundingClientRect();
const targetRect = target.getBoundingClientRect();
// In case the caret is below the visible input area, scroll to the cursor position
if (caretRect.top + caretRect.height > targetRect.top + targetRect.height) {
targetElement.scrollTop = caretRect.top + caretRect.height - targetRect.top - targetRect.height + target.scrollTop;
}
} I will come back to you with the PR today |
Here is the PR with the fix inside the |
@mallenexpensify, @mollfpr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Issue not reproducible during KI retests. (Third week) |
@mallenexpensify, @mollfpr 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
@Skalakid is working on so I add them as an assignee |
@mallenexpensify, @mollfpr, @Skalakid 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it! |
Hello, the PR with the bump was reverted. Here I'm bumping the library again |
@mallenexpensify, @mollfpr, @Skalakid 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it! |
Issue not reproducible during KI retests. (Fourth week) |
@mallenexpensify, @mollfpr, @Skalakid 12 days overdue now... This issue's end is nigh! |
This issue has not been updated in over 14 days. @mallenexpensify, @mollfpr, @Skalakid eroding to Weekly issue. |
@Skalakid can you provide an update? Wondering if this is worth fixing, def an edge case bug that's not going to affect many/anyone. |
Hello, the PR with the fix has been merged so the issue should be fixed now |
@mallenexpensify I can't repro the issue anymore. I think we can close this. |
Thanks @mollfpr , closing. Comment/reopen if anyone disagrees. |
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.10
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
Pasting long text in description must scrolled to bottom & cursor must be shown at end.
Actual Result:
Pasting long text in description not scrolled to bottom & cursor is shown in middle of text instead of end.
This happens in task description and in other description field across the app.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6548548_1721552717658.cur.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mollfprThe text was updated successfully, but these errors were encountered: