Add enter for keys to autocomplete name
This commit is contained in:
parent
80be38128f
commit
f9fa44ea77
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user