Hello, I have created a ticket for an enhancement of 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.
http://dev.rubyonrails.org/ticket/5435 I have also made some code changes directly in the script 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(); // } }, These changes are not in the best tradition of programming, but I am a javascript newbie and as a preliminary step I just wanted to get things working. 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 help me implement this feature. What am I doing wrong or missing in my implementation, which causes me to face the above problem? Thanks. -- Surendra Singhi http://ssinghi.kreeti.com, http://www.kreeti.com Read my blog at: http://cuttingtheredtape.blogspot.com/ ,---- | Great wits are sure to madness near allied, | And thin partitions do their bounds divide. | | (John Dryden, Absalom and Achitophel, 1681) `---- _______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
