1
0
forked from GitHub/gf-core

minibar.js: bug fix: the current word should be accepted when you press enter if it matches one of the possible completions exactly

The current word is also accepted if there is only one remaining possible
completion.
This commit is contained in:
hallgren
2010-09-14 16:48:20 +00:00
parent ed9999784f
commit ee36bac494

View File

@@ -241,7 +241,7 @@ function complete_typed(inp) {
function finish_typed(inp) {
//alert("finish_typed "+inp.value);
var box=element("words");
var w=inp.value+" ";
var w=inp.value;
if(box.completions.length==1)
add_word(box.completions[0]);
else if(elem(w,box.completions))