diff --git a/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentTextToolbar.swift b/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentTextToolbar.swift index b517bb5c99..317f8c14a1 100644 --- a/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentTextToolbar.swift +++ b/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentTextToolbar.swift @@ -347,6 +347,20 @@ class AttachmentTextToolbar: UIView, UITextViewDelegate { // MARK: - Helpers + // The tooltip lies outside this view's bounds, so we + // need to special-case the hit testing so that it can + // intercept touches within its bounds. + @objc + public override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { + if let viewOnceTooltip = self.viewOnceTooltip { + let tooltipFrame = convert(viewOnceTooltip.bounds, from: viewOnceTooltip) + if tooltipFrame.contains(point) { + return true + } + } + return super.point(inside: point, with: event) + } + private var shouldShowViewOnceTooltip: Bool { guard FeatureFlags.viewOnceSending else { return false