From c598b6325db7c6ce3dc341aebdef99dfff4f0dc1 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Thu, 28 Nov 2024 14:44:34 +0000 Subject: [PATCH] Fix a bug on iOS 17 where you couldn't long press on a message. (#3567) --- .../Timeline/View/Style/TimelineItemBubbledStylerView.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift b/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift index 037f7f1829..fcfd2160d8 100644 --- a/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift +++ b/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift @@ -124,6 +124,12 @@ struct TimelineItemBubbledStylerView: View { var messageBubbleWithActions: some View { messageBubble + .onTapGesture { + // We need a tap gesture before the long press gesture below, otherwise something + // on iOS 17 hijacks the long press and you can't bring up the context menu. This + // is no longer an issue on iOS 18. Note: it's fine for this to be empty, we handle + // specific taps within the timeline views themselves. + } .longPressWithFeedback { context.send(viewAction: .displayTimelineItemMenu(itemID: timelineItem.id)) }