diff --git a/Tusker/Views/ContentTextView.swift b/Tusker/Views/ContentTextView.swift index 8e81933c09..f313c1ce57 100644 --- a/Tusker/Views/ContentTextView.swift +++ b/Tusker/Views/ContentTextView.swift @@ -171,8 +171,13 @@ class ContentTextView: LinkTextView { } } - // only handles link taps via the gesture recognizer which is used when selection is disabled @objc func textTapped(_ recognizer: UITapGestureRecognizer) { + // if there currently is a selection, deselct it on single-tap + if selectedRange.length > 0 { + // location doesn't matter since we are non-editable and the cursor isn't visible + selectedRange = NSRange(location: 0, length: 0) + } + let location = recognizer.location(in: self) if let (link, range) = getLinkAtPoint(location) { let text = (self.text as NSString).substring(with: range)