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
[$250] Attachment – Cursor moves to beginning of password in PDF protected file when click on eye #44599
👋 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:
Identify the pull request that introduced this issue and revert it.
@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.
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
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.
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.
Activity
melvin-bot commentedon Jun 28, 2024
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.melvin-bot commentedon Jun 28, 2024
Triggered auto assignment to @nkuoch (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Jun 28, 2024
👋 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:
izarutskaya commentedon Jun 28, 2024
@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.
izarutskaya commentedon Jun 28, 2024
We think this issue might be related to the #vip-vsb.
2 remaining items
Julesssss commentedon Jun 28, 2024
Definitely not a blocker. I'm not sure we should even bothering to fix this to be honest.
[-]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[/+]melvin-bot commentedon Jun 28, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01eb95943a6e16733e
melvin-bot commentedon Jun 28, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allgandalf (
External)grogou commentedon Jun 28, 2024
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
passwordHiddenstate change that triggerssecureTextEntryprop change.What changes do you think we should make in order to solve the problem?
We need to remember the cursor position in the
BaseTextInputcomponent and usesetSelectionRangeto restore it whentogglePasswordVisibilityis called. Instead of tracking it with a newuseEffect, we can userequestAnimationFrameorsetTimeoutas alternative to ensure the DOM has updated before restoring the cursor position intogglePasswordVisibility.joekaufmanexpensify commentedon Jun 28, 2024
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.