Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 68eccac

Browse files
committed
Merge pull request #1506 from jurismarches/master
fix(uiSelectController): fix dropdown returning to activated element The dropdown was going back to the activated element ('A' for instance) when the user clicked on the 'X' element, which was quite annoying when he wanted to select also Y and Z Closes #976
2 parents 9e6b8ac + eea696b commit 68eccac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/uiSelectController.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ uis.controller('uiSelectCtrl',
135135
} else {
136136
$timeout(function () {
137137
ctrl.focusSearchInput(initSearchValue);
138+
if(!ctrl.tagging.isActivated && ctrl.items.length > 1) {
139+
_ensureHighlightVisible();
140+
}
138141
});
139142
}
140143
}
@@ -143,9 +146,6 @@ uis.controller('uiSelectCtrl',
143146
ctrl.focusSearchInput = function (initSearchValue) {
144147
ctrl.search = initSearchValue || ctrl.search;
145148
ctrl.searchInput[0].focus();
146-
if(!ctrl.tagging.isActivated && ctrl.items.length > 1) {
147-
_ensureHighlightVisible();
148-
}
149149
};
150150

151151
ctrl.findGroupByName = function(name) {

0 commit comments

Comments
 (0)