Skip to content

Commit

Permalink
fixing bug where user cannot click the dropdown to autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Bollin committed May 2, 2014
1 parent e5deeec commit 5a2a35f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jquery.textcomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@
this.index = 0;
this.completer = completer;

this.$el.on('click.textComplete', 'li.textcomplete-item',
this.$el.on('mousedown.textComplete', 'li.textcomplete-item',
$.proxy(this.onClick, this));
}

Expand Down Expand Up @@ -584,6 +584,7 @@

onClick: function (e) {
var $e = $(e.target);
e.preventDefault();
e.originalEvent.keepTextCompleteDropdown = true;
if (!$e.hasClass('textcomplete-item')) {
$e = $e.parents('li.textcomplete-item');
Expand Down

0 comments on commit 5a2a35f

Please sign in to comment.