From 8e801b876ec1c8746fd5c036c14169d224b7b5bb Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 4 Oct 2019 16:54:02 +0200 Subject: [PATCH 1/2] MXKRoomBubbleTableViewCell: Fix issue with links too easily touchable on iOS 13 (Fix #2738). --- .../Views/RoomBubbleList/MXKRoomBubbleTableViewCell.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MatrixKit/Views/RoomBubbleList/MXKRoomBubbleTableViewCell.m b/MatrixKit/Views/RoomBubbleList/MXKRoomBubbleTableViewCell.m index 13985db08..e1d25c776 100644 --- a/MatrixKit/Views/RoomBubbleList/MXKRoomBubbleTableViewCell.m +++ b/MatrixKit/Views/RoomBubbleList/MXKRoomBubbleTableViewCell.m @@ -1471,9 +1471,16 @@ - (IBAction)onLongPressGesture:(UILongPressGestureRecognizer*)longPressGestureRe #pragma mark - UITextView delegate -// Hyperlink quick tap in `messageTextView` are intercepted by `-(void)onMessageTap:` method. Otherwise longer tap, long press and force touch on a link are still catched here. +// On iOS 10 to iOS 13.0: Hyperlink quick tap in `messageTextView` are intercepted by `-(void)onMessageTap:` method. Otherwise longer tap, long press and force touch on a link are still catched here. +// On iOS 13.1+: The inner tap gesture of `messageTextView` is called before the tap gesture manually added by `MXKRoomBubbleTableViewCell`. Hyperlink quick tap and long press are intercepted here. - (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange interaction:(UITextItemInteraction)interaction API_AVAILABLE(ios(10.0)) { + // Do not interact with hyperlink on quick tap (default action). Let `-(void)onMessageTap:` method handle hyperlink quick tap. + if (interaction == UITextItemInteractionInvokeDefaultAction) + { + return NO; + } + BOOL shouldInteractWithURL = YES; if (delegate && URL) From 4a4781ddbe148bbef311da07c56a84112ae8c735 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 4 Oct 2019 16:56:29 +0200 Subject: [PATCH 2/2] Update changes --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index 71eec18eb..3d1056f42 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,7 @@ Improvements: Bug fix: * Display correctly the revoked third-party invite. + * MXKRoomBubbleTableViewCell: Fix issue with links too easily touchable on iOS 13 (vector-im/riot-ios/issues/2738). Changes in MatrixKit in 0.10.2 (2019-08-08) ==========================================