Autocomplete suggestions: selecting a filter suggestion for a valid filter adds a duplicate colon
Created by: lguychard
-
Sourcegraph version:
sourcegraph/server:3.10.0-rc.2
Steps to reproduce:
- Type in
repo:
(including the colon) - Notice autocomplete suggestions are still shown while (I assume) filter values for
repo:
are being fetched: - Select the valid filter in the suggestions
Expected behavior:
The query is unchanged, and filter value suggestions are shown
Actual behavior:
A duplicate colon is added to the query, no suggestions are shown:
It's easier to run into this if suggestions are slow to fetch, filter values can then be shown for a few seconds.
In an ideal world, as soon as the colon is typed, filter suggestions are hidden. In any case, I would expect that selecting a filter suggestion when having already typed a fully valid filter with colon, the query remains unchanged (and we should have a unit test for this).