Description
Describe the bug
In the "Texters" panel of the Edit page in Spoke administration, when using the "Search for texters to assign" field, it sometimes happens that a texter cannot be located by first name but can be located by last name. After some experimenting, I believe the problem is caused by untrimmed spaces (or perhaps other "invisible" characters) in one or both name fields. The reason I think this is that I can consistently find the texter if I type two spaces between the first and last name when searching.
To Reproduce
The problem is consistently reproducible with certain texter names, presumably because of the way their name fields were first populated when they made their account.
Expected behavior
First and last name fields should both be trimmed of white space and invisible characters (on both left and right) whenever a texter creates an account in Spoke or modifies their profile. For additional robustness, the values of these fields should also be trimmed before attempts to match to what the admin types into the texter assignment field.
Screenshots
Please see the attached four screen shots which illustrate attempts to locate "Elizabeth Naegle":
- Search by first name fails to match texter
- Search by last name does match texter
- Search by first name, space, start of last name fails to match texter
- Search by first name, two spaces, start of last name does match texter
Platform (please complete the following information):
- OS: MacOS High Sierra
- Browser: Chrome
- Desktop or Mobile? Desktop
- Version 10.13.6
Additional context
Add any other context about the problem here.