mirror of
https://github.com/bitwarden/mobile
synced 2025-12-14 15:23:35 +00:00
check password for null before setting cursor position (#1586)
This commit is contained in:
@@ -317,8 +317,9 @@ namespace Bit.App.Pages
|
|||||||
ShowPassword = !ShowPassword;
|
ShowPassword = !ShowPassword;
|
||||||
var page = (Page as LockPage);
|
var page = (Page as LockPage);
|
||||||
var entry = PinLock ? page.PinEntry : page.MasterPasswordEntry;
|
var entry = PinLock ? page.PinEntry : page.MasterPasswordEntry;
|
||||||
|
var str = PinLock ? Pin : MasterPassword;
|
||||||
entry.Focus();
|
entry.Focus();
|
||||||
entry.CursorPosition = PinLock ? Pin.Length : MasterPassword.Length;
|
entry.CursorPosition = String.IsNullOrEmpty(str) ? 0 : str.Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task PromptBiometricAsync()
|
public async Task PromptBiometricAsync()
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ namespace Bit.App.Pages
|
|||||||
ShowPassword = !ShowPassword;
|
ShowPassword = !ShowPassword;
|
||||||
var entry = (Page as LoginPage).MasterPasswordEntry;
|
var entry = (Page as LoginPage).MasterPasswordEntry;
|
||||||
entry.Focus();
|
entry.Focus();
|
||||||
entry.CursorPosition = MasterPassword.Length;
|
entry.CursorPosition = String.IsNullOrEmpty(MasterPassword) ? 0 : MasterPassword.Length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ namespace Bit.App.Pages
|
|||||||
ShowPassword = !ShowPassword;
|
ShowPassword = !ShowPassword;
|
||||||
var entry = (Page as RegisterPage).MasterPasswordEntry;
|
var entry = (Page as RegisterPage).MasterPasswordEntry;
|
||||||
entry.Focus();
|
entry.Focus();
|
||||||
entry.CursorPosition = MasterPassword.Length;
|
entry.CursorPosition = String.IsNullOrEmpty(MasterPassword) ? 0 : MasterPassword.Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ToggleConfirmPassword()
|
public void ToggleConfirmPassword()
|
||||||
@@ -211,7 +211,7 @@ namespace Bit.App.Pages
|
|||||||
ShowPassword = !ShowPassword;
|
ShowPassword = !ShowPassword;
|
||||||
var entry = (Page as RegisterPage).ConfirmMasterPasswordEntry;
|
var entry = (Page as RegisterPage).ConfirmMasterPasswordEntry;
|
||||||
entry.Focus();
|
entry.Focus();
|
||||||
entry.CursorPosition = ConfirmMasterPassword.Length;
|
entry.CursorPosition = String.IsNullOrEmpty(ConfirmMasterPassword) ? 0 : ConfirmMasterPassword.Length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user