Permalink
Browse files

ajax request doesn't fire if input field is empty or has only white s…

…pace
  • Loading branch information...
1 parent 1dbbaa3 commit c6f9e3177b2ec3919c85e7350bf36dacf4240b39 @raskchanky committed Jul 14, 2008
Showing with 1 addition and 0 deletions.
  1. +1 −0 jquery.ui.autocomplete.ext.js
@@ -18,6 +18,7 @@
$.ui.autocomplete.ext.ajax = function(opt) {
var ajax = opt.ajax;
return { getList: function(input) {
+ if (input.val().match(/^\s*$/)) return false;
$.getJSON(ajax, "val=" + input.val(), function(json) { input.trigger("updateList", [json]); });
} };
};

0 comments on commit c6f9e31

Please sign in to comment.