Move in a List does not work when using ScrollArea
When I add a ScrollArea to a VBox which contains a List and then add the list to the FocusChain I cannot move in the list with arrow-keys. It works fine as long as I don't have a ScrollArea around it. Am I missing something or is this a bug?
l := tui.NewList()
l.AddItems("line1", "line2", "line3", "line4")
l.SetSelected(0)
userScroll := tui.NewScrollArea(l)
userScroll.SetSizePolicy(tui.Preferred, tui.Maximum)
sidebar1 := tui.NewVBox(userScroll)
sidebar1.SetBorder(true)
sidebar1.SetTitle("List1")
sidebar.Prepend(sidebar1)
....
focusChain.Set(l, l2) // l2 is a list without a ScrollArea
Note that I have a "main" sidebar which holds 2 other sidebars (VBoxes) that contain a list each. One of them have a ScrollArea. And that one will not scroll when selected.
Looks like the key event is not being forwarded to the underlying widget.
ScrollArea should reimplement OnKeyEvent(ev KeyEvent) and pass on the event to the widget it encapsulates. Here's it's done for Box: https://github.com/marcusolsson/tui-go/blob/master/box.go#L213
I'd be happy to accept a PR, otherwise I should be able to add a fix for this during the week.