mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-08 23:15:28 +02:00
sidebar search navigation adjusted
This commit is contained in:
parent
480f79d466
commit
97555e094b
1 changed files with 1 additions and 3 deletions
|
@ -368,10 +368,8 @@ export default class Sidebar {
|
|||
element.classList.add(Sidebar.CSS.sectionListItemSlelected);
|
||||
}
|
||||
|
||||
// find the parent section.
|
||||
const parentSection = element.closest('section');
|
||||
// check if it's visible.
|
||||
const rect = parentSection.getBoundingClientRect();
|
||||
const rect = element.getBoundingClientRect();
|
||||
let elemTop = rect.top;
|
||||
let elemBottom = rect.bottom;
|
||||
const halfOfViewport = window.innerHeight / 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue