From 1480dc5b05c4701eca43335a882dcb433f23426f Mon Sep 17 00:00:00 2001 From: Oliver <480930+rivo@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:29:18 +0100 Subject: [PATCH] Fixed mouse focus issue in List. Fixes #773 --- list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/list.go b/list.go index a01936d..4347abf 100644 --- a/list.go +++ b/list.go @@ -713,6 +713,7 @@ func (l *List) MouseHandler() func(action MouseAction, event *tcell.EventMouse, } l.currentItem = index } + setFocus(l) consumed = true case MouseScrollUp: if l.itemOffset > 0 { @@ -727,7 +728,6 @@ func (l *List) MouseHandler() func(action MouseAction, event *tcell.EventMouse, if _, _, _, height := l.GetInnerRect(); lines > height { l.itemOffset++ } - setFocus(l) consumed = true }