Skip to content

[$250] Attachment – Cursor moves to beginning of password in PDF protected file when click on eye #44599

Closed

Description

@izarutskaya

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: 9.0.3-1
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/4678543
Email or phone of affected tester (no customers): applausetester+jp_e_category_1@applause.expensifail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log in
  3. Open any chat
  4. Click on + and Add attachment
  5. Select PDF protected file (do not click send)
  6. Click on Enter the password
  7. Enter text and click on the Eye to make your text visible

Expected Result:

Cursor is at the end of the password in PDF protected file when click on the eye

Actual Result:

Cursor moves to the beginning of the password in PDF protected file when click on the eye

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

Bug6526992_1719551334358.Atach.mp4

PDf file
Password_protected_Test12345.pdf

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01eb95943a6e16733e
  • Upwork Job ID: 1806640970628869277
  • Last Price Increase: 2024-06-28
Issue OwnerCurrent Issue Owner: @allgandalf

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Jun 28, 2024
  2. melvin-bot commented on Jun 28, 2024

    @melvin-bot

    Triggered auto assignment to @joekaufmanexpensify (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.

  3. melvin-bot commented on Jun 28, 2024

    @melvin-bot

    Triggered auto assignment to @nkuoch (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. github-actions commented on Jun 28, 2024

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. izarutskaya commented on Jun 28, 2024

    @izarutskaya
    Author

    @joekaufmanexpensify 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.

  6. izarutskaya commented on Jun 28, 2024

    @izarutskaya
    Author

    We think this issue might be related to the #vip-vsb.

  7. 2 remaining items

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    DeployBlockerIndicates it should block deploying the API
    on Jun 28, 2024
  9. Julesssss commented on Jun 28, 2024

    @Julesssss
    Contributor

    Definitely not a blocker. I'm not sure we should even bothering to fix this to be honest.

  10. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 28, 2024
  11. changed the title [-]Attachment – Cursor moves to beginning of password in PDF protected file when click on eye[/-] [+][$250] Attachment – Cursor moves to beginning of password in PDF protected file when click on eye[/+] on Jun 28, 2024
  12. melvin-bot commented on Jun 28, 2024

    @melvin-bot
  13. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jun 28, 2024
  14. melvin-bot commented on Jun 28, 2024

    @melvin-bot

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

  15. grogou commented on Jun 28, 2024

    @grogou

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When clicking on the eye icon in a PDF protected file, the cursor moves to the beginning of the password field.

    What is the root cause of that problem?

    The root cause is passwordHidden state change that triggers secureTextEntry prop change.

    What changes do you think we should make in order to solve the problem?

    We need to remember the cursor position in the BaseTextInput component and use setSelectionRange to restore it when togglePasswordVisibility is called. Instead of tracking it with a new useEffect, we can use requestAnimationFrame or setTimeout as alternative to ensure the DOM has updated before restoring the cursor position in togglePasswordVisibility.

  16. joekaufmanexpensify commented on Jun 28, 2024

    @joekaufmanexpensify
    Contributor

    Agreed with @Julesssss. The #vip-vsb project has been paused, so this doesn't feel worth prioritizing right now. This is a very niche bug. I'd be surprised if many/any customers experience this, and even if they do, there isn't really much impact.

    Going to close this for now, and we can revisit when/if we ever receive feedback from customers about this.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions