Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.

Commit 890e7cb

Browse files
committed
fixes #3
change blur event to tab key for triggering completion
1 parent 4f6e88d commit 890e7cb

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

demo/js/jquery.email-autocomplete.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@
7373
//bind events and handlers
7474
this.$field.on("keyup.eac", $.proxy(this.displaySuggestion, this));
7575

76-
this.$field.on("blur.eac", $.proxy(this.autocomplete, this));
77-
7876
this.$field.on("keydown.eac", $.proxy(function(e){
79-
if(e.which === 39){
77+
if(e.which === 39 || e.which === 9){
8078
this.autocomplete();
8179
}
8280
}, this));

dist/jquery.email-autocomplete.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@
7373
//bind events and handlers
7474
this.$field.on("keyup.eac", $.proxy(this.displaySuggestion, this));
7575

76-
this.$field.on("blur.eac", $.proxy(this.autocomplete, this));
77-
7876
this.$field.on("keydown.eac", $.proxy(function(e){
79-
if(e.which === 39){
77+
if(e.which === 39 || e.which === 9){
8078
this.autocomplete();
8179
}
8280
}, this));

dist/jquery.email-autocomplete.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jquery.email-autocomplete.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,8 @@
6565
//bind events and handlers
6666
this.$field.on("keyup.eac", $.proxy(this.displaySuggestion, this));
6767

68-
this.$field.on("blur.eac", $.proxy(this.autocomplete, this));
69-
7068
this.$field.on("keydown.eac", $.proxy(function(e){
71-
if(e.which === 39){
69+
if(e.which === 39 || e.which === 9){
7270
this.autocomplete();
7371
}
7472
}, this));

0 commit comments

Comments
 (0)