Skip to content

Commit

Permalink
fix last selection of parent of parent etc not being saved
Browse files Browse the repository at this point in the history
  • Loading branch information
Bauumm committed Aug 10, 2023
1 parent 2347c64 commit bbf9d91
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ui/keyboard_navigation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,13 @@ function keyboard_navigation.select_element(element)
if element.selection_handler then
element.selection_handler(element)
end
if element.parent.elements then
element.parent.last_selection = element
local elem = element
while elem.parent do
local parent = elem.parent
if parent.elements then
parent.last_selection = elem
end
elem = parent
end
scroll_into_view(element)
end
Expand Down

0 comments on commit bbf9d91

Please sign in to comment.