Skip to content

Commit 6483c19

Browse files
committed
Adds smooth scrolling to settings jumps
1 parent edb0a17 commit 6483c19

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/ui/scss/main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ ul {
878878

879879
.section-group__content {
880880
flex: auto 1 1;
881-
margin-bottom: 50%;
881+
margin-bottom: 100%;
882882
min-width: 0;
883883
}
884884

src/ui/shared/app-base.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,11 @@ export abstract class App<TBootstrap extends Bootstrap> {
171171
height = header.clientHeight;
172172
}
173173

174-
el.scrollIntoView({
175-
block: 'start',
176-
behavior: 'auto'
174+
const top = el.getBoundingClientRect().top - document.body.getBoundingClientRect().top - height;
175+
window.scrollTo({
176+
top: top,
177+
behavior: 'smooth'
177178
});
178-
window.scrollBy(0, -height);
179179

180180
e.stopPropagation();
181181
e.preventDefault();

0 commit comments

Comments
 (0)