-
Notifications
You must be signed in to change notification settings - Fork 136
Fix cursor location changing issue on toggle password #561
Conversation
@eliykat Just saw your comment on the issue I opened, should I move this PR into the browser repo or just leave this here for you to review? |
It's fine here - this is the right place for the PR. Because jslib is shared by the clients, it's totally normal to have a PR in jslib that fixes an issue reported in a client. |
I figured, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for the PR, please see my review comments below.
Once we have the changes settled here, it would be good to replicate them in lock.component.ts
as well. There are many places in our app that we have a show/hide button like this, it would be good to encapsulate this into a re-usable component, but that's a task for another day. This would at least solve the problem on the 2 most common pages.
Does this change (waiting until Can you please replicate for |
@eliykat I believe it did, didn't need to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done, thanks for the PR!
This will be in the January release.
Many thanks to all for sorting this issue out. |
Type of change
Objective
When you toggle visibility of the master password, the cursor moves to the start of the input field. Noticed it does this on Chrome web vault and Chrome browser extension. I tried on Safari and can't reproduce this issue.
Code changes
#557 , also 2178
Updated togglePassword() function to work with Chrome browser. Added a setTimeout of 0 ms (to defer the operation until the stack is clear) on focus since Chrome has an odd quirk where the focus event fires before the cursor is moved into the field.
login.component.ts
Testing requirements
Test toggle password visibility on all platforms.
Before you submit
npm run lint
) (required)