Skip to content

Commit 948d383

Browse files
committed
Merge pull request angular-ui#778 from AdamAxtmann/focus_fix
Wrap focus in timeout to prevent Error: $rootScope:inprog
2 parents 0ac10b0 + 06dd75d commit 948d383

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/uiSelectController.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,9 @@ uis.controller('uiSelectCtrl',
304304
ctrl.clear = function($event) {
305305
ctrl.select(undefined);
306306
$event.stopPropagation();
307-
ctrl.focusser[0].focus();
307+
$timeout(function() {
308+
ctrl.focusser[0].focus();
309+
}, 0, false);
308310
};
309311

310312
// Toggle dropdown

0 commit comments

Comments
 (0)