This is easiest to explain through examples (note that these will behave differently if you type too quickly!):
- Type 't' into an empty widget and press <enter> - a tag is created for (Main), the first item on the unfiltered list, then the list is filtered to namespaces beginning with 't'
- Type 'ta' into an empty widget and press <enter> - a tag is created for Talk, the first item on the list of namespaces beginning with 't', then the list is filtered to namespaces beginning with 'ta'
- Type 'to' into an empty widget and press <enter> - a tag is created for Talk, the first item on the list of namespaces beginning with 't', then the list is filtered to namespaces beginning with 'to'
Another symptom of the same problem (from T214197):
- There seems to be a timing/debounce bug with the widget: if I type 'user' (all lowercase) fairly quickly then "User" is not highlighted (grey background). If I type slowly everything works as expected.
Here, it would seem that the events are debounced and (Main) is selected first, then the list is filtered to namespaces beginning with 'user'
Expected behavior
- If a user types quickly, the suggestions should still highlight the best match. (There can be a few (micro?) second delay for performance reasons, if needed.)
- If no items are selected in the dropdown, pressing <enter> should do nothing.