Browse Source

Fixes scroll jumping issue on interactive settings

main
Eric Amodio 1 year ago
parent
commit
4c6331f438
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/webviews/apps/settings/settings.scss
  2. +1
    -1
      src/webviews/apps/shared/appWithConfigBase.ts

+ 1
- 1
src/webviews/apps/settings/settings.scss View File

@ -249,7 +249,7 @@ header {
.image__preview { .image__preview {
display: flex; display: flex;
width: auto;
width: 100%;
margin-top: 1em; margin-top: 1em;
} }
} }

+ 1
- 1
src/webviews/apps/shared/appWithConfigBase.ts View File

@ -356,7 +356,7 @@ export abstract class AppWithConfig extends Ap
const newTop = const newTop =
el.getBoundingClientRect().top - document.body.getBoundingClientRect().top - (offset ?? 0); el.getBoundingClientRect().top - document.body.getBoundingClientRect().top - (offset ?? 0);
if (top === newTop) return;
if (Math.abs(top - newTop) < 2) return;
this.scrollTo(el, behavior, offset); this.scrollTo(el, behavior, offset);
}, 50); }, 50);

Loading…
Cancel
Save