Skip to content
Snippets Groups Projects
Commit b0a1daa8 authored by Bruno Muniz's avatar Bruno Muniz :apple:
Browse files

Fix cursor moving to end of text once typing in between chars

parent 9ff96751
No related branches found
No related tags found
2 merge requests!77Releasing 1.1.6 (219),!74Fix cursor moving to end of text once typing in between chars
......@@ -122,7 +122,12 @@ public final class ChatInputView: UIToolbar {
.map(\.text)
.sink { [unowned self] in
if text.textView.markedTextRange == nil {
let range = text.textView.selectedTextRange
text.textView.text = $0
if let range = range {
text.textView.selectedTextRange = range
}
} else if $0 == "" {
text.textView.text = $0
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment