Fix scroll position when header is visible
This commit is contained in:
parent
0b1bee8c00
commit
d4296a34cc
@ -552,6 +552,11 @@ class Display {
|
||||
target = scroll;
|
||||
} else {
|
||||
target = this.index === 0 || entry === null ? 0 : Display.getElementTop(entry);
|
||||
|
||||
const header = document.querySelector('#navigation-header');
|
||||
if (header !== null) {
|
||||
target -= header.getBoundingClientRect().height;
|
||||
}
|
||||
}
|
||||
|
||||
if (smooth) {
|
||||
|
Loading…
Reference in New Issue
Block a user