From d2a8fe614d0a4a542f0d4fc643d2a391b1063bec Mon Sep 17 00:00:00 2001 From: Soner YUKSEL Date: Thu, 17 Aug 2023 16:56:05 -0400 Subject: [PATCH] Fix #7893: Browser Lock - Cancel Issue (#7894) --- Sources/Brave/Frontend/Passcode/WindowProtection.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Brave/Frontend/Passcode/WindowProtection.swift b/Sources/Brave/Frontend/Passcode/WindowProtection.swift index 19ffcd5764c..21e76001867 100644 --- a/Sources/Brave/Frontend/Passcode/WindowProtection.swift +++ b/Sources/Brave/Frontend/Passcode/WindowProtection.swift @@ -148,6 +148,8 @@ public class WindowProtection { NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification) .sink(receiveValue: { [weak self] _ in guard let self = self else { return } + // Should set as non cancallable for browser lock + self.isCancellable = false // Update visibility when entering background self.isVisible = Preferences.Privacy.lockWithPasscode.value && self.context.canEvaluatePolicy(.deviceOwnerAuthentication, error: nil) })