Skip to content

Commit

Permalink
typeahead: fix angular-ui#1773 with $timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
shayanelhami committed Feb 24, 2014
1 parent caeac33 commit 99febb1
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
$timeout(function() { element[0].focus(); }, 1, true);
$timeout(function() { element[0].focus(); }, 0, false);
};

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

0 comments on commit 99febb1

Please sign in to comment.