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

Merge branch 'fix/cursor-moving-to-end' into 'dev'

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

See merge request elixxir/client-ios!74
parents 6f876864 b0a1daa8
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 { ...@@ -122,7 +122,12 @@ public final class ChatInputView: UIToolbar {
.map(\.text) .map(\.text)
.sink { [unowned self] in .sink { [unowned self] in
if text.textView.markedTextRange == nil { if text.textView.markedTextRange == nil {
let range = text.textView.selectedTextRange
text.textView.text = $0 text.textView.text = $0
if let range = range {
text.textView.selectedTextRange = range
}
} else if $0 == "" { } else if $0 == "" {
text.textView.text = $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