Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: focus keyboard if biometry is disabled

Ammar Ahmed71811ebf0db0
diff --git a/apps/mobile/app/components/app-lock/index.tsx b/apps/mobile/app/components/app-lock/index.tsx
index 61d0742f1..f8aed90a5 100644
--- a/apps/mobile/app/components/app-lock/index.tsx
+++ b/apps/mobile/app/components/app-lock/index.tsx
@@ -289,6 +289,14 @@ const AppLocked = () => {
keyboardType={
appLockHasPasswordSecurity ? keyboardType : "default"
}
+ onLayout={async () => {
+ if (
+ !biometricsAuthEnabled ||
+ !(await BiometricService.isBiometryAvailable())
+ ) {
+ passwordInputRef.current?.focus();
+ }
+ }}
placeholder={
appLockHasPasswordSecurity
? keyboardType === "numeric"