mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-22 11:35:21 +01:00
Set cursor position after toggle password visibility (#1568)
- Lock page - Login page - Register page
This commit is contained in:
parent
d3734c63fc
commit
faac7ebe5e
@ -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 New Issue
Block a user