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:
@@ -241,7 +241,7 @@ function complete_typed(inp) {
|
|||||||
function finish_typed(inp) {
|
function finish_typed(inp) {
|
||||||
//alert("finish_typed "+inp.value);
|
//alert("finish_typed "+inp.value);
|
||||||
var box=element("words");
|
var box=element("words");
|
||||||
var w=inp.value+" ";
|
var w=inp.value;
|
||||||
if(box.completions.length==1)
|
if(box.completions.length==1)
|
||||||
add_word(box.completions[0]);
|
add_word(box.completions[0]);
|
||||||
else if(elem(w,box.completions))
|
else if(elem(w,box.completions))
|
||||||
|
|||||||
Reference in New Issue
Block a user