mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 03:02:49 +01:00
exp/handleinput: bug fix: Field.HandleInput unexpectedly returned true without any events
This commit is contained in:
parent
11bbc52bcf
commit
c985e9bdc6
@ -118,13 +118,13 @@ func (f *Field) HandleInput(x, y int) (handled bool, err error) {
|
||||
f.err = state.Error
|
||||
return false, f.err
|
||||
}
|
||||
handled = true
|
||||
if !ok {
|
||||
f.ch = nil
|
||||
f.end = nil
|
||||
f.state = State{}
|
||||
break readchar
|
||||
}
|
||||
handled = true
|
||||
if state.Committed {
|
||||
f.text = f.text[:f.selectionStart] + state.Text + f.text[f.selectionEnd:]
|
||||
f.selectionStart += len(state.Text)
|
||||
|
Loading…
Reference in New Issue
Block a user