mirror of
https://github.com/rivo/tview.git
synced 2024-11-12 19:10:28 +00:00
Allow changing focus in handler
This commit is contained in:
parent
7b79cb6347
commit
089ac467f8
@ -742,6 +742,7 @@ func (t *TreeView) MouseHandler() func(action MouseAction, event *tcell.EventMou
|
||||
|
||||
switch action {
|
||||
case MouseLeftClick:
|
||||
setFocus(t)
|
||||
_, rectY, _, _ := t.GetInnerRect()
|
||||
y -= rectY
|
||||
if y >= 0 && y < len(t.nodes) {
|
||||
@ -758,7 +759,6 @@ func (t *TreeView) MouseHandler() func(action MouseAction, event *tcell.EventMou
|
||||
}
|
||||
}
|
||||
consumed = true
|
||||
setFocus(t)
|
||||
case MouseScrollUp:
|
||||
t.movement = treeUp
|
||||
consumed = true
|
||||
|
Loading…
Reference in New Issue
Block a user