-
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
[PAYMENT 3/4][$500] iOS - IOU - The cursor appears at random locations after pasting #35420
Comments
Triggered auto assignment to @CortneyOfstad ( |
Job added to Upwork: https://www.upwork.com/jobs/~0180563495c94b9556 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
We think that this bug might be related to #vip-vsb |
ProposalPlease re-state the problem that we are trying to solve in this issue.Pasting a number on the money request input moves the selection to the left. What is the root cause of that problem?When we set a selection that is larger than the input value length, the selection will be put on the left. You can test this by having a button that will set the selection to a number that is larger than the current input value length. In our case, when we paste something to the amount input that has a value, a whitespace is also added. This behavior is also found on this old issue. So, the total length of the input is added by 1 because of the whitespace, but we strip the space from the input. App/src/pages/iou/steps/MoneyRequestAmountForm.js Lines 143 to 147 in 4e88eea
So, if the input is "2(whitespace)5", the new input state will be "25" and the value is updated before Btw, to reproduce it easier, you can just type a number to the input then paste anything afterwards. What changes do you think we should make in order to solve the problem?We can clamp the selection value so it doesn't set a value larger than the current input length. App/src/pages/iou/steps/MoneyRequestAmountForm.js Lines 295 to 300 in 4e88eea
What alternative solutions did you explore? (Optional)We can ignore the selection change if there is any update with the amount (because we already handle it manually). There is a
I guess ref would be more performant |
@rushatgabhane any thoughts on the proposal above? |
@bernhardoj's proposal fixes the root cause #35420 (comment) |
Triggered auto assignment to @tylerkaraszewski, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@bernhardoj any update on the PR? Thank you! |
@CortneyOfstad I'm waiting to get assigned first |
📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR is ready cc: @rushatgabhane |
@rushatgabhane @bernhardoj any update on the PR/review? Thanks! |
PR shows it is in staging as of 3 days ago. Will continue to keep an eye on this. |
PR in production as of 2 days ago 👍 |
Triggered auto assignment to @trjExpensify ( |
Hey @trjExpensify! I am heading OoO and will be back March 11th, so reassigned to have someone keep this moving until I am back. At this stage, the PR here went into production 3 days ago. If there are no regressions, the payment is set for Monday, March 4. Payment breakdown is below: Payment Summary@bernhardoj — $500 to be paid in Upwork |
https://staging.new.expensify.com/r/4222149771653350 money request here |
$500 approved for @rushatgabhane based on summary above. |
Paid $500 out @bernhardoj based on the payment summary here. @rushatgabhane confirmed to have requested, closing. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.33.0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause- Internal Team
Slack conversation:
Issue found when executing PR #35119
Action Performed:
Expected Result:
It should be appearing right after the paster number.
Actual Result:
The cursor appears at random locations after pasting.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6361115_1706634381199.JSTP7179.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: