SlackTextViewController
SlackTextViewController copied to clipboard
Prefill textview with "@" prefix
- [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
- [x] I've read and agree to the Code of Conduct.
- [x] I've searched for any related issues and avoided creating a duplicate issue.
Description
This bug happens when we try to prefill the textview with an "@" prefix and try to edit it or add more prefixes to it. When we go to add another "@" prefix and then select a suggestion, the selected suggestion text attaches itself to the start of the textview.
Reproducible in:
- [x] This is reproducible in the sample project.
SlackTextViewController version: iOS version(s): 9.3 Device(s): Simulator
Steps to reproduce:
- Open workspace to edit the Messenger-Swift project.
- Add textViewDidBeginEditing method.
- Add textView.text = "@Someone " to the method.
- Run the project.
- Find the cursor stuck on the "@"
- Try to add another prefix "@", select any auto complete suggestion.
Expected result:
Search suggestion when tapped should attach next to the cursor.
Actual result:
You'll find the selected suggestion text attach itself all the way at the start of the textview.