Bugfix: Help screen broken tabbing shortcuts

This commit is contained in:
djmaze 2021-08-12 20:33:13 +02:00
parent 8b116fa8ba
commit 64a7b82408
3 changed files with 45 additions and 59 deletions

View file

@ -88,28 +88,6 @@
self.toggle = () => element.open ? self.hide() : self.show();
open(false);
element.Dropdown = self;
},
Tab: class {
constructor(element) {
this.element = element
element.Tab = this;
element.addEventListener('click', e => {
e.preventDefault();
this.show();
});
}
show() {
const el = this.element, li = el.closest('li');
if (!li.classList.contains('active')) {
const previous = el.closest('ul').querySelector('.active a');
previous.closest('li').classList.remove('active');
doc.querySelector(previous.getAttribute('href')).classList.remove('active');
li.classList.add('active');
doc.querySelector(el.getAttribute('href')).classList.add('active');
}
}
}
};