We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1b01b7 commit 2c47611Copy full SHA for 2c47611
app/src/layout/dock/Files.ts
@@ -1110,12 +1110,8 @@ data-type="navigation-root" data-path="/">
1110
target.classList.add("b3-list-item--focus");
1111
1112
if (isScroll) {
1113
- const targetRect = target.getBoundingClientRect();
1114
- const containerRect = this.element.getBoundingClientRect();
1115
-
1116
- const relativeTop = targetRect.top - containerRect.top + this.element.scrollTop;
1117
1118
- this.element.scrollTop = relativeTop - this.element.clientHeight / 2 - this.actionsElement.clientHeight;
+ const elementRect = this.element.getBoundingClientRect();
+ this.element.scrollTop = this.element.scrollTop + (target.getBoundingClientRect().top - (elementRect.top + elementRect.height / 2));
1119
}
1120
1121
0 commit comments