From 407daf0bfa9cbb86078d8f5497a10c80e53963ce Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 29 Mar 2011 08:05:15 +0200 Subject: work around minLength problem in jquery-ui-autocomplete --- data/templates/editbookmark.tpl.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 69d3897..1783692 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -154,6 +154,10 @@ jQuery(document).ready(function() { source: function(request, response) { // delegate back to autocomplete, but extract the last term + var term = extractLast(request.term); + if (term.length < this.options.minLength) { + return; + } response( /* $.ui.autocomplete.filter( @@ -162,7 +166,7 @@ jQuery(document).ready(function() { */ $.getJSON( "", - { beginsWith: extractLast(request.term) }, + { beginsWith: term }, response ) ); -- cgit v1.2.3