aboutsummaryrefslogtreecommitdiffstats
path: root/gui/widget/widget.go
diff options
context:
space:
mode:
Diffstat (limited to 'gui/widget/widget.go')
-rw-r--r--gui/widget/widget.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/gui/widget/widget.go b/gui/widget/widget.go
index 913809b..fbf866a 100644
--- a/gui/widget/widget.go
+++ b/gui/widget/widget.go
@@ -42,7 +42,7 @@ func Input(env gui.Env, r image.Rectangle, val chan<- float64) {
text = fmt.Appendf(text, "%c", event.Rune)
env.Draw() <- redraw(text)
case win.KbDown:
- if event.Key == win.KeyBackspace && len(text) > 0 {
+ if event.Key == win.KeyBackspace && focus && len(text) > 0 {
text = text[:len(text)-1]
env.Draw() <- redraw(text)
}