mirror of
https://github.com/bitwarden/mobile
synced 2025-12-05 23:53:33 +00:00
Set cursor position after toggle password visibility (#1568)
- Lock page - Login page - Register page
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user