SlackTextViewController icon indicating copy to clipboard operation
SlackTextViewController copied to clipboard

Prefill textview with "@" prefix

Open eshwartm opened this issue 8 years ago • 0 comments

  • [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:

  1. Open workspace to edit the Messenger-Swift project.
  2. Add textViewDidBeginEditing method.
  3. Add textView.text = "@Someone " to the method.
  4. Run the project.
  5. Find the cursor stuck on the "@"
  6. 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.

eshwartm avatar Jul 07 '16 12:07 eshwartm