exp/textinput: bug fix: enter key doesn't insert a new line char

This commit is contained in:
Hajime Hoshi 2024-02-04 14:20:29 +09:00
parent 5c7bfd3ed7
commit 60673752a1

View File

@ -99,6 +99,11 @@ func (t *textInput) init() {
t.trySend(true) t.trySend(true)
return nil return nil
} }
if e.Get("data").Equal(js.Null()) {
// When a new line is inserted, the 'data' property might be null.
t.trySend(true)
return nil
}
t.trySend(false) t.trySend(false)
return nil return nil
})) }))