Skip to content

Commit 4e9d624

Browse files
author
Isaac
committed
Fix apple intelligence gesture conflict
1 parent a523f70 commit 4e9d624

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate, Ch
539539
var customEmojiContainerView: CustomEmojiContainerView?
540540

541541
let textInputBackgroundNode: ASImageNode
542+
var textInputBackgroundTapRecognizer: TouchDownGestureRecognizer?
542543
private var transparentTextInputBackgroundImage: UIImage?
543544
let actionButtons: ChatTextInputActionButtonsNode
544545
private let slowModeButton: BoostSlowModeButton
@@ -1089,6 +1090,7 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate, Ch
10891090
return false
10901091
}
10911092
}
1093+
self.textInputBackgroundTapRecognizer = recognizer
10921094
self.textInputBackgroundNode.isUserInteractionEnabled = true
10931095
self.textInputBackgroundNode.view.addGestureRecognizer(recognizer)
10941096

@@ -1166,6 +1168,11 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate, Ch
11661168
textInputNode.isUserInteractionEnabled = !self.sendingTextDisabled
11671169
self.textInputNode = textInputNode
11681170

1171+
if let textInputBackgroundTapRecognizer = self.textInputBackgroundTapRecognizer {
1172+
self.textInputBackgroundTapRecognizer = nil
1173+
self.textInputBackgroundNode.view.removeGestureRecognizer(textInputBackgroundTapRecognizer)
1174+
}
1175+
11691176
var accessoryButtonsWidth: CGFloat = 0.0
11701177
var firstButton = true
11711178
for (_, button) in self.accessoryItemButtons {

0 commit comments

Comments
 (0)