From 2b03637b5222846b8778b1d804fc87c2ef23db58 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 2 Aug 2023 18:09:13 +0900 Subject: [PATCH] examples/textinput: bug fix: reset the state after committing --- examples/textinput/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/textinput/main.go b/examples/textinput/main.go index 7a86c3f00..1c7f70371 100644 --- a/examples/textinput/main.go +++ b/examples/textinput/main.go @@ -181,7 +181,7 @@ func (t *TextField) Update() { t.text = t.text[:t.selectionStart] + state.Text + t.text[t.selectionEnd:] t.selectionStart += len(state.Text) t.selectionEnd = t.selectionStart - state = textinput.State{} + t.state = textinput.State{} continue } t.state = state