diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 3b6c01171..d58e41526 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -4593,6 +4593,9 @@ static CGSize kThreadListBarButtonItemImageSize; // Do nothing for dummy links shouldDoAction = NO; break; + case RoomMessageURLTypeHttp: + shouldDoAction = YES; + break; default: { MXEvent *tappedEvent = userInfo[kMXKRoomBubbleCellEventKey]; @@ -4618,16 +4621,20 @@ static CGSize kThreadListBarButtonItemImageSize; break; case UITextItemInteractionPresentActions: { - // Retrieve the tapped event - MXEvent *tappedEvent = userInfo[kMXKRoomBubbleCellEventKey]; - - if (tappedEvent) - { - // Long press on link, present room contextual menu. - [self showContextualMenuForEvent:tappedEvent fromSingleTapGesture:NO cell:cell animated:YES]; + if (roomMessageURLType == RoomMessageURLTypeHttp) { + shouldDoAction = YES; + } else { + // Retrieve the tapped event + MXEvent *tappedEvent = userInfo[kMXKRoomBubbleCellEventKey]; + + if (tappedEvent) + { + // Long press on link, present room contextual menu. + [self showContextualMenuForEvent:tappedEvent fromSingleTapGesture:NO cell:cell animated:YES]; + } + + shouldDoAction = NO; } - - shouldDoAction = NO; } break; case UITextItemInteractionPreview: diff --git a/Riot/Modules/Room/TimelineCells/Common/MXKRoomBubbleTableViewCell.m b/Riot/Modules/Room/TimelineCells/Common/MXKRoomBubbleTableViewCell.m index 13eac3bcc..1b39e9822 100644 --- a/Riot/Modules/Room/TimelineCells/Common/MXKRoomBubbleTableViewCell.m +++ b/Riot/Modules/Room/TimelineCells/Common/MXKRoomBubbleTableViewCell.m @@ -237,6 +237,7 @@ static BOOL _disableLongPressGestureOnEvent; [tapGesture setDelegate:self]; [self.messageTextView addGestureRecognizer:tapGesture]; self.messageTextView.userInteractionEnabled = YES; + self.messageTextView.clipsToBounds = NO; // Recognise and make tappable phone numbers, address, etc. self.messageTextView.dataDetectorTypes = UIDataDetectorTypeAll; diff --git a/changelog.d/pr-6936.change b/changelog.d/pr-6936.change new file mode 100644 index 000000000..d1e649c9f --- /dev/null +++ b/changelog.d/pr-6936.change @@ -0,0 +1 @@ +Improves external links interaction UX.