Skip to content

Commit

Permalink
Fix angular-ui#1773 by calling focus in a $timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
shayanelhami committed Feb 18, 2014
1 parent acf423a commit caeac33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typeahead/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap

//return focus to the input element if a mach was selected via a mouse click event
// use timeout to avoid $rootScope:inprog error
setTimeout(function() { element[0].focus(); }, 1);
$timeout(function() { element[0].focus(); }, 1, true);
};

//bind keyboard events: arrows up(38) / down(40), enter(13) and tab(9), esc(27)
Expand Down

0 comments on commit caeac33

Please sign in to comment.