Fix topPresentationContext overlay focus handling

This commit is contained in:
Ali 2020-01-21 23:58:49 +04:00
parent 79ac746282
commit 5ad48ef7d4
2 changed files with 11 additions and 1 deletions

View File

@ -201,6 +201,7 @@ public final class AppLockContextImpl: AppLockContext {
}
}
passcodeController.presentedOverCoveringView = true
passcodeController.isOpaqueWhenInOverlay = true
strongSelf.passcodeController = passcodeController
if let rootViewController = strongSelf.rootController {
if let presentedViewController = rootViewController.presentedViewController as? UIActivityViewController {

View File

@ -337,8 +337,17 @@ public class Window1 {
self?.isInteractionBlocked = value
}
let updateOpaqueOverlays: () -> Void = { [weak self] in
guard let strongSelf = self else {
return
}
strongSelf._rootController?.displayNode.accessibilityElementsHidden = strongSelf.presentationContext.hasOpaqueOverlay || strongSelf.topPresentationContext.hasOpaqueOverlay
}
self.presentationContext.updateHasOpaqueOverlay = { [weak self] value in
self?._rootController?.displayNode.accessibilityElementsHidden = value
updateOpaqueOverlays()
}
self.topPresentationContext.updateHasOpaqueOverlay = { [weak self] value in
updateOpaqueOverlays()
}
self.hostView.present = { [weak self] controller, level, blockInteraction, completion in