mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-15 18:59:54 +00:00
Fixed context menu buttons not firing events while in landscape with keyboard on screen
This commit is contained in:
parent
53d47c7851
commit
df55d0269d
@ -1,11 +1,21 @@
|
||||
import Foundation
|
||||
import AsyncDisplayKit
|
||||
|
||||
final private class ContextMenuActionButton: HighlightTrackingButton {
|
||||
override func convert(_ point: CGPoint, from view: UIView?) -> CGPoint {
|
||||
if view is UIWindow {
|
||||
return super.convert(point, from: nil)
|
||||
} else {
|
||||
return super.convert(point, from: view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final class ContextMenuActionNode: ASDisplayNode {
|
||||
private let textNode: ASTextNode?
|
||||
private let iconNode: ASImageNode?
|
||||
private let action: () -> Void
|
||||
private let button: HighlightTrackingButton
|
||||
private let button: ContextMenuActionButton
|
||||
|
||||
var dismiss: (() -> Void)?
|
||||
|
||||
@ -30,7 +40,7 @@ final class ContextMenuActionNode: ASDisplayNode {
|
||||
}
|
||||
self.action = action.action
|
||||
|
||||
self.button = HighlightTrackingButton()
|
||||
self.button = ContextMenuActionButton()
|
||||
|
||||
super.init()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user