We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e85291 commit 0291bbfCopy full SHA for 0291bbf
src/uiSelectDirective.js
@@ -115,10 +115,9 @@ uis.directive('uiSelect',
115
// Will lose focus only with certain targets
116
var focusableControls = ['input', 'button', 'textarea'];
117
// To check if target is other ui-select
118
- var targetScope = angular.element(e.target).scope();
+ var targetController = angular.element(e.target).controller('uiSelect');
119
120
- var skipFocusser = targetScope && targetScope.$select &&
121
- targetScope.$select !== $select;
+ var skipFocusser = targetController && targetController !== $select;
122
// Check if target is input, button or textarea
123
if (!skipFocusser) {
124
skipFocusser = ~focusableControls.indexOf(e.target.tagName.toLowerCase());
0 commit comments