mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 01:10:09 +00:00
Fix context menu overlay accessibility focus
This commit is contained in:
parent
9b4f576e77
commit
9dcb3926ea
@ -1593,6 +1593,7 @@ public final class ContextController: ViewController, StandalonePresentableContr
|
||||
self.statusBar.statusBarStyle = .Hide
|
||||
}
|
||||
self.lockOrientation = true
|
||||
self.blocksBackgroundWhenInOverlay = true
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
|
||||
@ -1022,6 +1022,19 @@ open class NavigationController: UINavigationController, ContainableController,
|
||||
|
||||
var topHasOpaque = false
|
||||
var foundControllerInFocus = false
|
||||
|
||||
for container in self.globalOverlayContainers.reversed() {
|
||||
let controller = container.controller
|
||||
if topHasOpaque {
|
||||
controller.displayNode.accessibilityElementsHidden = true
|
||||
} else {
|
||||
if controller.isOpaqueWhenInOverlay || controller.blocksBackgroundWhenInOverlay {
|
||||
topHasOpaque = true
|
||||
}
|
||||
controller.displayNode.accessibilityElementsHidden = false
|
||||
}
|
||||
}
|
||||
|
||||
for container in self.overlayContainers.reversed() {
|
||||
if foundControllerInFocus {
|
||||
container.controller.isInFocus = false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user