Skip to content

Commit

Permalink
Fixing stack overflow caused by didSet on selectedTextRange property. (
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeassis authored Sep 15, 2020
1 parent e16f907 commit 44206d2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ios/FluentUI/Table View/TableViewHeaderFooterView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,14 @@ private class TableViewHeaderFooterTitleView: UITextView {
}

override var selectedTextRange: UITextRange? {
didSet {
get {
// No need for selection, but we need to keep it selectable in order for links to work
if selectedTextRange != nil {
selectedTextRange = nil
}
return nil
}

set {
// No-op because we don't want to allow this property to be set.
// It should always return nil which indicates there is no current selection (https://developer.apple.com/documentation/uikit/uitextinput/1614541-selectedtextrange)
}
}
}

0 comments on commit 44206d2

Please sign in to comment.