When you select a suggested keyword the search should start automatically!!!
| Project: | Keyword Autocomplete |
| Version: | 6.x-1.0-beta1 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Hi,
this is a great module. Thanks a lot! (BZW, I've just switched from Search Autocomplete).
I'm not sure if this is a Bug-report or a Feature-request. Here it is:
Right now while I type a search keword several suggestions will pop out, and when I select one of those suggestions (with a mouse or the Enter button), nothing happens!!! This is disorienting and unintuitive, especially for the theme's search boxes that do not feature the "Search button". What I would suggest is that once one of the autocompleted suggestions is selected the search should start instantly! Check out how it is done on www.Wikipedia.org or www.YouTube.com or www.Facebook.com and many other sites where such functionality exists -- the search process starts as soon as one of the suggestions is selected!
Because of the standard set by those major sites, people are already accustomed to expect the search process to start as soon as one of the keywords is selected.

#1
I too would like to see this feature. The number of times i have used my own site and done the same thing is countless.
#2
Also ... www.Google.com has recently introduced this functionality and with exactly the same process as I described it above, so there you have it. I guess this is a web *standard* of how search autocomplete should behave.
#3
I agree this would be nice to see...
#4
It could be that this simply isn't possible given Drupal's implementation of autocomplete. There is currently a discussion about enhancing autocomplete but I don't know that this has come up: #125231: Enhance autocomplete feature
#5
Having said that we should be able to make it work with a little bit of JS trickery- api.drupal.org manages to do it with the following snippet:
Drupal.behaviors.apiAutoComplete = function (context) {$('#api-search-form:not(.apiAutoCompleteProcessed)', context).addClass('apiAutoCompleteProcessed').each(function () {
// On the first focus.
$('#edit-search', this).attr('autocomplete', 'off').one('focus', function () {
var $this = $(this);
// Prefetch list of objects for this branch.
$.getJSON(Drupal.settings.apiAutoCompletePath, function (data) {
// Attach to autocomplete.
$this.autocomplete(data, {
sort: function (a, b) {
return a.value.length - b.value.length;
},
matchContains: true,
max: 200,
scroll: true,
scrollHeight: 360,
width: 300
}).result(function () {
$this.get(0).form.submit();
}).focus();
});
});
});
};
I am no JS guru however, so someone else might need to take the lead on this if you want it done soon.
#6
I needed this functionality too, so to get it done quickly I borrowed some code from the finder_autocomplete module.
I have attached a patch for the drupal 6 version which seems to work for me so far.