Skip to content

Commit 4d84a62

Browse files
author
SimonSteinberger
committed
Prevent unnecessary search on pressing enter.
1 parent 8025c64 commit 4d84a62

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

auto-complete.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
JavaScript autoComplete v1.0.0 beta
2+
JavaScript autoComplete v1.0.0
33
Copyright (c) 2014 Simon Steinberger / Pixabay
44
GitHub: https://github.com/Pixabay/JavaScript-autoComplete
55
License: http://www.opensource.org/licenses/mit-license.php
@@ -167,7 +167,7 @@ var autoComplete = (function(){
167167

168168
that.keyupHandler = function(e){
169169
var key = window.event ? e.keyCode : e.which;
170-
if (key != 27 && key != 38 && key != 40 && key != 37 && key != 39) {
170+
if (key != 38 && key != 40 && key != 37 && key != 39 && key != 13 && key != 27) {
171171
var val = that.value;
172172
if (val.length >= o.minChars) {
173173
if (val != that.last_val) {

auto-complete.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readme.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ http://goodies.pixabay.com/javascript/auto-complete/demo.html
2222

2323
## Changelog
2424

25-
### Version 1.0.0 beta - 2015/05/102
25+
### Version 1.0.0 - 2015/06/07
26+
27+
* Prevent unnecessary search on pressing enter.
28+
29+
### Version 1.0.0 beta - 2015/05/12
2630

2731
* First release

0 commit comments

Comments
 (0)