mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
a87f0ec58a
commit
6cb1cc9602
1 changed files with 6 additions and 1 deletions
|
|
@ -919,7 +919,12 @@ export class Files extends Model {
|
||||||
});
|
});
|
||||||
target.classList.add("b3-list-item--focus");
|
target.classList.add("b3-list-item--focus");
|
||||||
if (isScroll) {
|
if (isScroll) {
|
||||||
this.element.scrollTop = target.offsetTop - this.element.clientHeight / 2 - this.actionsElement.clientHeight;
|
let offsetTop = target.offsetTop;
|
||||||
|
// https://github.com/siyuan-note/siyuan/issues/8749
|
||||||
|
if (target.parentElement.classList.contains("file-tree__sliderDown") && target.offsetParent) {
|
||||||
|
offsetTop = (target.offsetParent as HTMLElement).offsetTop;
|
||||||
|
}
|
||||||
|
this.element.scrollTop = offsetTop - this.element.clientHeight / 2 - this.actionsElement.clientHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue