From f3544c1b10cf7f370a232354cbe2c6e2d20d8fd0 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Mon, 6 Nov 2023 18:10:19 -0800 Subject: [PATCH] be extra sure not to "leak" cursor animations --- widget/entry.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/widget/entry.go b/widget/entry.go index 15629c48e7..0e1f9e947c 100644 --- a/widget/entry.go +++ b/widget/entry.go @@ -312,6 +312,11 @@ func (e *Entry) FocusGained() { // // Implements: fyne.Focusable func (e *Entry) FocusLost() { + // be extra sure we won't "leak" cursor animations + if e.cursorAnim != nil { + e.cursorAnim.stop() + } + e.setFieldsAndRefresh(func() { e.focused = false e.selectKeyDown = false