From 0c399a8d93461bfbd9e13dccf0aeaee905df3507 Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Sun, 17 May 2020 15:31:06 +0200 Subject: [PATCH] Only animate when textbox has focus. --- ui/textbox.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/textbox.go b/ui/textbox.go index f87763e..e174aad 100644 --- a/ui/textbox.go +++ b/ui/textbox.go @@ -138,7 +138,9 @@ func (b *TextBox) Handle(ctx Context, e Event) bool { } ctx.Renderer().SetMouseCursor(MouseCursorText) } - ctx.Animate() + if b.Focus { + ctx.Animate() + } switch e := e.(type) { case *MouseButtonDownEvent: