mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 01:48:25 +03:00
Set cursor position after toggle password visibility (#1568)
- Lock page - Login page - Register page
This commit is contained in:
parent
d3734c63fc
commit
faac7ebe5e
3 changed files with 10 additions and 3 deletions
|
@ -318,6 +318,7 @@ namespace Bit.App.Pages
|
|||
var page = (Page as LockPage);
|
||||
var entry = PinLock ? page.PinEntry : page.MasterPasswordEntry;
|
||||
entry.Focus();
|
||||
entry.CursorPosition = PinLock ? Pin.Length : MasterPassword.Length;
|
||||
}
|
||||
|
||||
public async Task PromptBiometricAsync()
|
||||
|
|
|
@ -185,7 +185,9 @@ namespace Bit.App.Pages
|
|||
public void TogglePassword()
|
||||
{
|
||||
ShowPassword = !ShowPassword;
|
||||
(Page as LoginPage).MasterPasswordEntry.Focus();
|
||||
var entry = (Page as LoginPage).MasterPasswordEntry;
|
||||
entry.Focus();
|
||||
entry.CursorPosition = MasterPassword.Length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue