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

Commit f012815

Browse files
committed
fix(focus): prevent focus stealing when clicking on other ui-select element
1 parent 73e30ec commit f012815

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/select.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,8 @@
11911191
}
11921192

11931193
if (!contains && !$select.clickTriggeredSelect) {
1194-
$select.close(angular.element(e.target).closest('.ui-select-container.open').length > 0); // Skip focusser if the target is another select
1194+
var targetScope = angular.element(e.target).scope();
1195+
$select.close(targetScope && targetScope.$select && targetScope.$select !== $select); // Skip focusser if the target is another select
11951196
scope.$digest();
11961197
}
11971198
$select.clickTriggeredSelect = false;

0 commit comments

Comments
 (0)