Skip to content

[HOLD for payment 2024-04-15] [$500] One character jumps after cursor when typing fast #39360

Description

@m-natarajan

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.58-4
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: @mountiny
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1711707948520499

Action Performed:

  1. Open any chat
  2. Type fast in the composer

Expected Result:

All the characters added should be before the cursor

Actual Result:

One character jumps after the cursor.
NOTE: Very hard to reproduce. I had to type 2 lines to reproduce this bug

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Recording.2929.mp4
Screen.Recording.2024-03-29.at.10.22.06.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0109e66f48fc7c7130
  • Upwork Job ID: 1775928557129052160
  • Last Price Increase: 2024-04-04

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 1, 2024
  2. melvin-bot commented on Apr 1, 2024

    @melvin-bot

    Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. ZhenjaHorbach commented on Apr 1, 2024

    @ZhenjaHorbach
    Contributor

    Actually, problem related with MarkdownTextInput and with this useEffect

    https://github.com/Expensify/react-native-live-markdown/blob/main/src/MarkdownTextInput.web.tsx#L527-L533

    When we quickly enter text, desynchronization occurs with the current value from the props and with the current value of the input itself
    As a result, we select the previous characters from props

    As far as I know, these problems are being fixed by the creators of the component
    But I think in order to fix this We can use debounce function to make sure that the values are kept in sync when entering text

  4. self-assigned this
    on Apr 2, 2024
  5. thienlnam commented on Apr 2, 2024

    @thienlnam
    Contributor

    Added to the tracking issue, going to upgrade this to a high since I can reproduce pretty reliably on Desktop

  6. aldo-expensify commented on Apr 3, 2024

    @aldo-expensify
    Contributor

    I agree with the cause being what @ZhenjaHorbach found here. In my testing, I put a debugger and I can see that contentSelection has the wrong values (36), while it should really have 37 which is the current text length.

    image
  7. added
    ReviewingHas a PR in review
    and removed on Apr 4, 2024
  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Apr 4, 2024
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Apr 4, 2024
  10. melvin-bot commented on Apr 4, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @rojiphil (External)

  11. 23 remaining items

  12. thienlnam commented on Apr 5, 2024

    @thienlnam
    Contributor

    There's already an existing payment issue for that #37387

  13. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Apr 8, 2024
  14. changed the title [-][$500] One character jumps after cursor when typing fast[/-] [+][HOLD for payment 2024-04-15] [$500] One character jumps after cursor when typing fast[/+] on Apr 8, 2024
  15. melvin-bot commented on Apr 8, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  16. melvin-bot commented on Apr 8, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 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-04-15. 🎊

    For reference, here are some details about the assignees on this issue:

  17. melvin-bot commented on Apr 8, 2024

    @melvin-bot

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@shubham1206agra] The PR that introduced the bug has been identified. Link to the PR:
    • [@shubham1206agra] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@shubham1206agra] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@shubham1206agra] Determine if we should create a regression test for this bug.
    • [@shubham1206agra] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@bfitzexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  18. melvin-bot commented on Apr 15, 2024

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@bfitzexpensify)

    • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1775928557129052160/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  19. bfitzexpensify commented on Apr 16, 2024

    @bfitzexpensify
    Contributor

    @shubham1206agra please accept the Upwork job offer for https://www.upwork.com/jobs/~017cf6471b3178918c - thank you!

  20. bfitzexpensify commented on Apr 17, 2024

    @bfitzexpensify
    Contributor

    Payment complete. Closing this one out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions