Skip to content

Commit

Permalink
[Aztec iOS]: shouldInteractWith will return always true to avoid cr…
Browse files Browse the repository at this point in the history
…ashes
  • Loading branch information
etoledom committed Oct 31, 2019
1 parent dac461b commit d5bd76f
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions react-native-aztec/ios/RNTAztecView/RCTAztecView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -627,18 +627,6 @@ extension RCTAztecView: UITextViewDelegate {
}

func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool {
if #available(iOS 13.1, *) {
return false
} else if #available(iOS 13.0.0, *) {
// Sergio Estevao: This shouldn't happen in an editable textView, but it looks we have a system bug in iOS13 so we need this workaround
let position = characterRange.location
textView.selectedRange = NSRange(location: position, length: 0)
textView.typingAttributes = textView.attributedText.attributes(at: position, effectiveRange: nil)
textView.delegate?.textViewDidChangeSelection?(textView)
} else {
return false
}

return false
}
}

0 comments on commit d5bd76f

Please sign in to comment.