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

Commit 7e666ab

Browse files
author
Robert Messerle
committed
fix(autocomplete): hitting enter with an item selected no longer resets the selected item
Closes #2183
1 parent fcd0050 commit 7e666ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/autocomplete/js/autocompleteController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
updateSelectionMessage();
213213
break;
214214
case $mdConstant.KEY_CODE.ENTER:
215-
if (self.loading || self.index < 0) return;
215+
if (self.hidden || self.loading || self.index < 0) return;
216216
event.preventDefault();
217217
select(self.index);
218218
break;

0 commit comments

Comments
 (0)