ui/app: (wasm) switch from <textarea> to <input> to avoid double newline

With a <textarea> DOM element pressing the enter key will result in
a "Enter" key down event and a "\n" input event. We're only
interested in the key event, so switching to a single line <input>
avoids the extra "\n".

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-06-09 15:11:02 +02:00
parent 441ca835c3
commit 1931582683
+1 -1
View File
@@ -67,7 +67,7 @@ func createWindow(opts *WindowOptions) error {
}
func createTextArea(doc js.Value) js.Value {
tarea := doc.Call("createElement", "textarea")
tarea := doc.Call("createElement", "input")
style := tarea.Get("style")
style.Set("width", "1px")
style.Set("height", "1px")