mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +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 page = (Page as LockPage);
|
||||||
var entry = PinLock ? page.PinEntry : page.MasterPasswordEntry;
|
var entry = PinLock ? page.PinEntry : page.MasterPasswordEntry;
|
||||||
entry.Focus();
|
entry.Focus();
|
||||||
|
entry.CursorPosition = PinLock ? Pin.Length : MasterPassword.Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task PromptBiometricAsync()
|
public async Task PromptBiometricAsync()
|
||||||
|
|
|
@ -185,7 +185,9 @@ namespace Bit.App.Pages
|
||||||
public void TogglePassword()
|
public void TogglePassword()
|
||||||
{
|
{
|
||||||
ShowPassword = !ShowPassword;
|
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()
|
public void TogglePassword()
|
||||||
{
|
{
|
||||||
ShowPassword = !ShowPassword;
|
ShowPassword = !ShowPassword;
|
||||||
(Page as RegisterPage).MasterPasswordEntry.Focus();
|
var entry = (Page as RegisterPage).MasterPasswordEntry;
|
||||||
|
entry.Focus();
|
||||||
|
entry.CursorPosition = MasterPassword.Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ToggleConfirmPassword()
|
public void ToggleConfirmPassword()
|
||||||
{
|
{
|
||||||
ShowPassword = !ShowPassword;
|
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