summaryrefslogtreecommitdiffstats
path: root/awesomplete.js
diff options
context:
space:
mode:
Diffstat (limited to 'awesomplete.js')
-rw-r--r--awesomplete.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/awesomplete.js b/awesomplete.js
index cc1f3da..2f74d65 100644
--- a/awesomplete.js
+++ b/awesomplete.js
@@ -96,7 +96,7 @@ var _ = function (input, o) {
}
if (li && evt.button === 0) { // Only select on left click
- me.select(li);
+ me.select(li, evt);
}
}
}});
@@ -190,7 +190,7 @@ _.prototype = {
$.fire(this.input, "awesomplete-highlight");
},
- select: function (selected) {
+ select: function (selected, originalEvent) {
selected = selected || this.ul.children[this.index];
if (selected) {
@@ -200,7 +200,8 @@ _.prototype = {
text: selected.textContent,
preventDefault: function () {
prevented = true;
- }
+ },
+ originalEvent: originalEvent
});
if (!prevented) {