Skip to content

Commit

Permalink
Fix broken passing of event object
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Halse committed Apr 28, 2015
1 parent f2417ff commit 0022f5b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Small and fast autocomplete plugin for Zepto and jQuery.
* Written by Johan Halse, https://twitter.com/hejsna, [email protected]
* License: http://johanhalse.mit-license.org
* @version 0.4.2
* @version 0.4.3
* @return {object} Self
*/
(function(window, $) {
Expand Down Expand Up @@ -517,7 +517,7 @@
this.nextItem();
}
if(e.keyCode == 13) { // Enter
this.onPressEnter();
this.onPressEnter(e);
}
if(e.keyCode == 27) { // Esc
e.preventDefault();
Expand All @@ -539,7 +539,7 @@
* User has pressed enter, select object or perform search.
* @return {null}
*/
onPressEnter: function() {
onPressEnter: function(e) {
// If field is filled in but no item is selected, we don't block
// submit
if(this.selectedItem === null) {
Expand Down

0 comments on commit 0022f5b

Please sign in to comment.