[iOS]Fix Unlock and Cancel buttons not shown when creating new private tab (#34382)

Fix Unlock and Cancel buttons not shown when creating new private tab with lock enabled

When "Require Touch ID/Face ID" was enabled for private tabs, the Unlock and Cancel buttons were hidden when creating a new private tab via the + button and cancelling the biometric prompt.

- Always show Unlock button when auth fails so user can retry
- Set isCancellable=true for non-external view types to show Cancel button

Signed-off-by: Eli Hini <8249954+EliHini@users.noreply.github.com>
This commit is contained in:
Eli Hini
2026-03-03 14:13:06 -08:00
committed by GitHub
parent 263959fa7f
commit e374bfc6fe
@@ -235,9 +235,7 @@ public class WindowProtection {
}
lockedViewController.unlockButton.isHidden = true
if viewType == .external {
isCancellable = false
}
isCancellable = viewType != .external
context.evaluatePolicy(
.deviceOwnerAuthentication,
@@ -257,7 +255,7 @@ public class WindowProtection {
}
)
} else {
lockedViewController.unlockButton.isHidden = viewType == .general
lockedViewController.unlockButton.isHidden = false
let errorPolicy = error as? LAError
completion?(false, errorPolicy?.code)