Reputation: 1700
In Scriptaculous Ajax autocomplter it chooses the first entry by default . how do i stop it from choosing the first option by default??
Upvotes: 1
Views: 929
Reputation: 342695
In controls.js of the Scriptaculous library, on line 286: change "this.index = 0;" to "this.index = -1;". That will fix your problem.
It's a pain that there's no option along the lines of { autoSelectFirst: false }. Hopefully in a future release :)
On another note, you might want to have a look at: http://docs.jquery.com/Plugins/Autocomplete
which lets you disable selecting the first option out of the box.
Upvotes: 1