Bugfix: options menu nav broken with new ListItem classes

The autofocus and nav functions were still using the old class
name .list-item-indicator instead of .list-item which it actually
is now.
This commit is contained in:
Badri Sunderarajan 2024-03-24 23:07:40 +05:30
parent c4cd385cfe
commit d36fd1afe8
Signed by: badrihippo
GPG key ID: 9F594532AD60DE03

View file

@ -7,7 +7,7 @@
let currentIndex = Number(document.activeElement.dataset.index || 0)
let next = currentIndex + move
let items = document
.querySelectorAll('.options .list-item-indicator')
.querySelectorAll('.options .list-item')
// Loop around if at end
if (next < 0) next = items.length - 1
@ -42,7 +42,7 @@
// Focus the first option item
let optionItems = document
.querySelectorAll('.options .list-item-indicator');
.querySelectorAll('.options .list-item');
// Set the index attributes (We assume this won't
// change too often/until the next time the menu