File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -149,8 +149,8 @@ uis.directive('uiSelect',
149
149
if ( ! contains && ! $select . clickTriggeredSelect ) {
150
150
//Will lose focus only with certain targets
151
151
var focusableControls = [ 'input' , 'button' , 'textarea' ] ;
152
- var targetScope = angular . element ( e . target ) . scope ( ) ; //To check if target is other ui-select
153
- var skipFocusser = targetScope && targetScope . $select && targetScope . $select !== $select ; //To check if target is other ui-select
152
+ var targetController = angular . element ( e . target ) . controller ( 'uiSelect' ) ; //To check if target is other ui-select
153
+ var skipFocusser = targetController && targetController !== $select ; //To check if target is other ui-select
154
154
if ( ! skipFocusser ) skipFocusser = ~ focusableControls . indexOf ( e . target . tagName . toLowerCase ( ) ) ; //Check if target is input, button or textarea
155
155
$select . close ( skipFocusser ) ;
156
156
scope . $digest ( ) ;
You can’t perform that action at this time.
0 commit comments