Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions script/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var app = angular.module('autocomplete', []);

app.directive('autocomplete', function() {
app.directive('autocomplete', function($timeout) {
var index = -1;

return {
Expand Down Expand Up @@ -91,7 +91,7 @@ app.directive('autocomplete', function() {
}
watching = false;
$scope.completing = false;
setTimeout(function(){watching = true;},1000);
$timeout(function(){watching = true;},1000);
$scope.setIndex(-1);
};

Expand All @@ -100,7 +100,7 @@ app.directive('autocomplete', function() {
link: function(scope, element, attrs){
console.log(scope.noAutoSort)

setTimeout(function() {
$timeout(function() {
scope.initLock = false;
scope.$apply();
}, 250);
Expand Down Expand Up @@ -128,7 +128,7 @@ app.directive('autocomplete', function() {
if (attrs.clickActivation) {
element[0].onclick = function(e){
if(!scope.searchParam){
setTimeout(function() {
$timeout(function() {
scope.completing = true;
scope.$apply();
}, 200);
Expand All @@ -154,7 +154,7 @@ app.directive('autocomplete', function() {
document.addEventListener("blur", function(e){
// disable suggestions on blur
// we do a timeout to prevent hiding it before a click event is registered
setTimeout(function() {
$timeout(function() {
scope.select();
scope.setIndex(-1);
scope.$apply();
Expand Down