1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-23 19:53:50 +00:00

Set cursor position after toggle password visibility (#1568)

- Lock page
- Login page
- Register page
This commit is contained in:
Jake Fink
2021-10-08 12:09:08 -04:00
committed by GitHub
parent d3734c63fc
commit faac7ebe5e
3 changed files with 10 additions and 3 deletions

View File

@@ -201,13 +201,17 @@ namespace Bit.App.Pages
public void TogglePassword()
{
ShowPassword = !ShowPassword;
(Page as RegisterPage).MasterPasswordEntry.Focus();
var entry = (Page as RegisterPage).MasterPasswordEntry;
entry.Focus();
entry.CursorPosition = MasterPassword.Length;
}
public void ToggleConfirmPassword()
{
ShowPassword = !ShowPassword;
(Page as RegisterPage).ConfirmMasterPasswordEntry.Focus();
var entry = (Page as RegisterPage).ConfirmMasterPasswordEntry;
entry.Focus();
entry.CursorPosition = ConfirmMasterPassword.Length;
}
}
}