Hello,
I want the autocompleter to show the options immediately when the field gets focus. Right now at least one character must be typed for autocomplete to kick in.
Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this));
Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this));
Event.observe(this.element, "focus", this.onKeyPress.bindAsEventListener(this));
The last line is what I have added.
And then I have commented some code:
onObserverEvent: function() {
this.changed = false;
// if(this.getToken().length>=this.options.minChars) {
this.startIndicator();
this.getUpdatedChoices();
// } else {
// this.active = false;
// this.hide();
// }
},
The problem with these changes is that in an empty field it is not possible to select an item from the drop down by clicking on it.
(using arrows and tabs work fine).
Please consider adding such a feature to autocompleter.