From 6296da9c39d0883391d40956d8a56caceb2edae4 Mon Sep 17 00:00:00 2001 From: Westley Knight Date: Tue, 19 Feb 2013 17:02:20 +0000 Subject: [PATCH] #77 Issue fixed Amended createItemFromResult to fire on mousedown rather than click, preventing a prolonged mouse click from hiding the autocomplete dropdown and not updating the text input. --- src/jquery.autocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery.autocomplete.js b/src/jquery.autocomplete.js index 0b861de..05b49c0 100644 --- a/src/jquery.autocomplete.js +++ b/src/jquery.autocomplete.js @@ -822,7 +822,7 @@ var self = this; var $li = $('
  • ' + this.showResult(result.value, result.data) + '
  • '); $li.data({value: result.value, data: result.data}) - .click(function() { + .mousedown(function() { self.selectItem($li); }) .mousedown(self.disableFinishOnBlur)