mirror of
https://github.com/bitwarden/android.git
synced 2025-01-11 18:57:39 +03:00
check password for null before setting cursor position (#1586)
This commit is contained in:
parent
17b89dc21c
commit
f3ff991abe
3 changed files with 5 additions and 4 deletions
|
@ -317,8 +317,9 @@ namespace Bit.App.Pages
|
|||
ShowPassword = !ShowPassword;
|
||||
var page = (Page as LockPage);
|
||||
var entry = PinLock ? page.PinEntry : page.MasterPasswordEntry;
|
||||
var str = PinLock ? Pin : MasterPassword;
|
||||
entry.Focus();
|
||||
entry.CursorPosition = PinLock ? Pin.Length : MasterPassword.Length;
|
||||
entry.CursorPosition = String.IsNullOrEmpty(str) ? 0 : str.Length;
|
||||
}
|
||||
|
||||
public async Task PromptBiometricAsync()
|
||||
|
|
|
@ -187,7 +187,7 @@ namespace Bit.App.Pages
|
|||
ShowPassword = !ShowPassword;
|
||||
var entry = (Page as LoginPage).MasterPasswordEntry;
|
||||
entry.Focus();
|
||||
entry.CursorPosition = MasterPassword.Length;
|
||||
entry.CursorPosition = String.IsNullOrEmpty(MasterPassword) ? 0 : MasterPassword.Length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -203,7 +203,7 @@ namespace Bit.App.Pages
|
|||
ShowPassword = !ShowPassword;
|
||||
var entry = (Page as RegisterPage).MasterPasswordEntry;
|
||||
entry.Focus();
|
||||
entry.CursorPosition = MasterPassword.Length;
|
||||
entry.CursorPosition = String.IsNullOrEmpty(MasterPassword) ? 0 : MasterPassword.Length;
|
||||
}
|
||||
|
||||
public void ToggleConfirmPassword()
|
||||
|
@ -211,7 +211,7 @@ namespace Bit.App.Pages
|
|||
ShowPassword = !ShowPassword;
|
||||
var entry = (Page as RegisterPage).ConfirmMasterPasswordEntry;
|
||||
entry.Focus();
|
||||
entry.CursorPosition = ConfirmMasterPassword.Length;
|
||||
entry.CursorPosition = String.IsNullOrEmpty(ConfirmMasterPassword) ? 0 : ConfirmMasterPassword.Length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue