This commit is contained in:
Isaac
2025-12-26 21:42:12 +08:00
parent 216a49c71e
commit 816632ae38
2 changed files with 9 additions and 1 deletions

View File

@@ -201,7 +201,6 @@ public final class ChatTextInputActionButtonsNode: ASDisplayNode, ChatSendMessag
self.expandMediaInputButton = HighlightTrackingButton()
self.expandMediaInputButtonBackgroundView = GlassBackgroundView()
self.expandMediaInputButtonBackgroundView.isUserInteractionEnabled = false
self.expandMediaInputButtonIcon = GlassBackgroundView.ContentImageView()
self.expandMediaInputButtonBackgroundView.contentView.addSubview(self.expandMediaInputButtonIcon)
self.expandMediaInputButtonBackgroundView.contentView.addSubview(self.expandMediaInputButton)

View File

@@ -391,6 +391,15 @@ public class GlassBackgroundView: UIView {
}
override public func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
if !self.isUserInteractionEnabled {
return nil
}
if self.isHidden {
return nil
}
if self.alpha == 0.0 {
return nil
}
if let nativeView = self.nativeView {
if let result = nativeView.hitTest(self.convert(point, to: nativeView), with: event) {
return result