mirror of https://github.com/rivo/tview.git
Fixed mouse focus issue in List. Fixes #773
This commit is contained in:
parent
f5cddba6f0
commit
1480dc5b05
2
list.go
2
list.go
|
@ -713,6 +713,7 @@ func (l *List) MouseHandler() func(action MouseAction, event *tcell.EventMouse,
|
||||||
}
|
}
|
||||||
l.currentItem = index
|
l.currentItem = index
|
||||||
}
|
}
|
||||||
|
setFocus(l)
|
||||||
consumed = true
|
consumed = true
|
||||||
case MouseScrollUp:
|
case MouseScrollUp:
|
||||||
if l.itemOffset > 0 {
|
if l.itemOffset > 0 {
|
||||||
|
@ -727,7 +728,6 @@ func (l *List) MouseHandler() func(action MouseAction, event *tcell.EventMouse,
|
||||||
if _, _, _, height := l.GetInnerRect(); lines > height {
|
if _, _, _, height := l.GetInnerRect(); lines > height {
|
||||||
l.itemOffset++
|
l.itemOffset++
|
||||||
}
|
}
|
||||||
setFocus(l)
|
|
||||||
consumed = true
|
consumed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue