This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Description
If you have a list of items ['foo', 'bar']
and you type 'fo'
'foo' is listed under the input. This is fine.
If you enter 'foo' then the list disappears which is fine too.
BUT from there pressing ENTER does not select the item and initiate md-selected-item-change.
However, if you type 'foo' then press DOWN ARROW then ENTER it will select it properly because the highlighted item index was changed to 0 by pressing DOWN ARROW.
I think it should automatically select the first item in the list when you press ENTER if no item is highlighted (index == -1) and the list has at least one item in it.
https://github.com/angular/material/blame/master/src/components/autocomplete/js/autocompleteController.js#L158-L162
maybe do something like this?
If item list is > 0 and index == -1
select(0)