Skip to content

Commit 1838509

Browse files
Stefan Zollingerasiacomeau
authored andcommitted
fix(uiSelectCtrl): ensureHighlightVisible triggered with closed dropdown
This fix ensures that the dropdown actually is open before calling _ensureHighlightVisible. Fixes: angular-ui#2050
1 parent 3b00c3f commit 1838509

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/uiSelectController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ uis.controller('uiSelectCtrl',
153153
} else {
154154
$timeout(function () {
155155
ctrl.focusSearchInput(initSearchValue);
156-
if(!ctrl.tagging.isActivated && ctrl.items.length > 1) {
156+
if(!ctrl.tagging.isActivated && ctrl.items.length > 1 && ctrl.open) {
157157
_ensureHighlightVisible();
158158
}
159159
});

0 commit comments

Comments
 (0)