From 503c08929ff22feb3e7c8b37e3732c1c25e3cc2f Mon Sep 17 00:00:00 2001 From: Stefan Zollinger Date: Thu, 31 Aug 2017 11:39:24 +0200 Subject: [PATCH] fix(uiSelectCtrl): ensureHighlightVisible triggered with closed dropdown This fix ensures that the dropdown actually is open before calling _ensureHighlightVisible. Fixes: #2050 --- src/uiSelectController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uiSelectController.js b/src/uiSelectController.js index a92b94d2a..1f2483f04 100644 --- a/src/uiSelectController.js +++ b/src/uiSelectController.js @@ -158,7 +158,7 @@ uis.controller('uiSelectCtrl', } else { $timeout(function () { ctrl.focusSearchInput(initSearchValue); - if(!ctrl.tagging.isActivated && ctrl.items.length > 1) { + if(!ctrl.tagging.isActivated && ctrl.items.length > 1 && ctrl.open) { _ensureHighlightVisible(); } });