Skip to content

Commit

Permalink
fix crash when scrolling a list with a row focused
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed Jun 14, 2024
1 parent 169b914 commit dd66de9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/widgets/focuslist.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ func (l *FocusListRowBase) SetItemID(id widget.ListItemID) {

func (l *FocusListRowBase) EnsureUnfocused() {
if l.Focused {
fyne.CurrentApp().Driver().CanvasForObject(l).Unfocus()
c := fyne.CurrentApp().Driver().CanvasForObject(l)
if c != nil {
c.Unfocus()
}
}
l.Focused = false
}
Expand Down

0 comments on commit dd66de9

Please sign in to comment.