mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Fix context menu overlay accessibility focus
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user