mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
exp/textinput: bug fix: enter key doesn't insert a new line char
This commit is contained in:
parent
5c7bfd3ed7
commit
60673752a1
@ -99,6 +99,11 @@ func (t *textInput) init() {
|
||||
t.trySend(true)
|
||||
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)
|
||||
return nil
|
||||
}))
|
||||
|
Loading…
Reference in New Issue
Block a user