mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
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:
+1
-1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user