You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Pay meow][$250] Web - Composer - Cursor positioned at the start if pasting text which contains a new line #42216
@Christinadobrzyn FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
When pasted text contains empty line, the value of node.length is greater than it's actually length because the length of line break at the end(\n\n) will be caculated as 2.
So console error occurs and cursor is not set because we are trying to set cursor to non-exist position.
What changes do you think we should make in order to solve the problem?
We have to set range with node.length - 1 when it contains empty line at the end.
What alternative solutions did you explore? (Optional)
📣 @moonstar-95515! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
changed the title [-]Web - Composer - Cursor positioned at the start if pasting text which contains a new line[/-][+][$250] Web - Composer - Cursor positioned at the start if pasting text which contains a new line[/+]on May 20, 2024
The decision to compensate @rakhaxor is an edge case, based on the fact they were assigned to the issue and hired. It was the responsibility of Expensify to hire/assign. Since this action is considered a source-of-truth and gives the green light for the contributor to invest more time into the issue (assuming compensation), we feel it's fair to compensate. Since their proposal was initially accepted, we decided on 50%.
@moonstar-95515 , your compensation on this issue, and the value associated with it, is completely unrelated to the compensation for @rakhaxor. Please keep in mind our documented code of conduct when communicating with others, both internal and with fellow contributors.
We pride ourselves as a company and as individual employees on our core qualities: Talent, Ambition, & Humility. The environment we have developed uses these qualities to adhere to our two golden rules of Expensify:
Activity
melvin-bot commentedon May 15, 2024
Triggered auto assignment to @Christinadobrzyn (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.kbecciv commentedon May 15, 2024
We think that this bug might be related to #wave-collect - Release 1
kbecciv commentedon May 15, 2024
@Christinadobrzyn FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
Christinadobrzyn commentedon May 16, 2024
Very similar to #42112 - asking if the fix will be the same
MOONSTAR-TOP-DEV commentedon May 16, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Web - Composer - Cursor positioned at the start if pasting text which contains a new line
What is the root cause of that problem?
We are setting cursor position in below part when pasting.
App/src/hooks/useHtmlPaste/index.ts
Lines 19 to 20 in fb14d5a
When pasted text contains empty line, the value of
node.lengthis greater than it's actually length because the length of line break at the end(\n\n) will be caculated as 2.So console error occurs and cursor is not set because we are trying to set cursor to non-exist position.
What changes do you think we should make in order to solve the problem?
We have to set range with
node.length - 1when it contains empty line at the end.What alternative solutions did you explore? (Optional)
melvin-bot commentedon May 16, 2024
📣 @moonstar-95515! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
Christinadobrzyn commentedon May 20, 2024
Doesn't seem to be related to #42112 as that is resolved. I can still reproduce this - adding external
[-]Web - Composer - Cursor positioned at the start if pasting text which contains a new line[/-][+][$250] Web - Composer - Cursor positioned at the start if pasting text which contains a new line[/+]melvin-bot commentedon May 20, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01cc45b59ee9c4ae02
82 remaining items
mallenexpensify commentedon Aug 19, 2024
The decision to compensate @rakhaxor is an edge case, based on the fact they were assigned to the issue and hired. It was the responsibility of Expensify to hire/assign. Since this action is considered a source-of-truth and gives the green light for the contributor to invest more time into the issue (assuming compensation), we feel it's fair to compensate. Since their proposal was initially accepted, we decided on 50%.
@moonstar-95515 , your compensation on this issue, and the value associated with it, is completely unrelated to the compensation for @rakhaxor. Please keep in mind our documented code of conduct when communicating with others, both internal and with fellow contributors.
Thanks
melvin-bot commentedon Aug 19, 2024
@AndrewGable, @eVoloshchak, @rakhaxor, @Christinadobrzyn, @moonstar-95515 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Christinadobrzyn commentedon Aug 19, 2024
Quick follow up - based on a review (as Matt outlined) we are going to continue with this payment summary.
@eVoloshchak can you accept this Upwork offer - https://www.upwork.com/nx/wm/offer/103544327
@rakhaxor can you accept this Upwork offer - https://www.upwork.com/nx/wm/offer/103593092
TY!
rakhaxor commentedon Aug 20, 2024
Hello @Christinadobrzyn! I have accepted the offer on Upwork. Thank you
eVoloshchak commentedon Aug 20, 2024
@Christinadobrzyn, declined the Upwork offer, requested the payment on NewDot
Thanks!
Christinadobrzyn commentedon Aug 20, 2024
Awesome! Thanks! The payment summary is here.
Feel free to submit your NewDot payment @eVoloshchak. Also, I don't see that it was asked but do we need a regression test for this?
JmillsExpensify commentedon Aug 20, 2024
$250 approved for @eVoloshchak
Christinadobrzyn commentedon Aug 20, 2024
@eVoloshchak can you let us know about a regression test? Then I think this is good to close!
eVoloshchak commentedon Aug 21, 2024
Yes, a regression test would be useful and easy to perform
Regression Test Proposal
Do we agree 👍 or 👎
Christinadobrzyn commentedon Aug 21, 2024
Regression test is created - https://github.com/Expensify/Expensify/issues/422290
Closing!
melvin-bot commentedon Aug 21, 2024
@AndrewGable @Christinadobrzyn Be sure to fill out the Contact List!