Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Display autosuggest suggestions on initial focus #5420
Currently, if you have an empty autosuggest field and no value in it when you focus on the field the autosuggest field continues to display just like a plain text field. If you add a value, the unfocus from the field and return to focus on the field, the autosuggest suggestions dropdown immediately appears. If you have a value and delete the characters of that value until there are no characters in the field, the suggestions dropdown also appears.
It would be nice if the suggestion dropdown appeared the first time the field is focused on as well.
For common suggestions like Environment Variables and Aliases and Templates, it may be clear what a user will want to type in an Autosuggest field. However, in less common settings in plugins, where we want to stay consistent with the UI, it is not always as obvious what the user may want to type into the autosuggest field and having the suggestions appear immediately helps communicate the range of options available.
For one example, in Sprout SEO we let a user choose a character that displays between two sections of the meta title. In this case, the dropdown suggestions for the autosuggest field are single characters:
While this example is likely one of the extremes, it illustrates well that for less common suggestions, when the suggestions don't appear immediately, it may not be clear to the user that common options are suggested to them as examples, until they start adding characters to the field. The main goal here isn't to ease the users ability to choose a single character but to show the user several examples of how they can use the field. Using the autosuggest field to show these examples is a nice, in-context way to do this as an alternative to a lengthy, paragraph-style, instructional comment.
Steps to reproduce