Add enter for keys to autocomplete name

This commit is contained in:
joeyak 2019-03-16 14:27:13 -04:00
parent 80be38128f
commit f9fa44ea77

View File

@ -12,6 +12,7 @@ import (
const (
keyTab = 9
keyEnter = 13
keyUp = 38
keyDown = 40
)
@ -51,7 +52,7 @@ func processMessageKey(this js.Value, v []js.Value) interface{} {
}
}
currentName = filteredNames[newidx]
case keyTab:
case keyTab, keyEnter:
msg := js.Get("msg")
val := msg.Get("value").String()
newval := val[:startIdx] + currentName