瀏覽代碼

Fixes scroll jumping issue on interactive settings

main
Eric Amodio 1 年之前
父節點
當前提交
4c6331f438
共有 2 個文件被更改,包括 2 次插入2 次删除
  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 查看文件

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

+ 1
- 1
src/webviews/apps/shared/appWithConfigBase.ts 查看文件

@ -356,7 +356,7 @@ export abstract class AppWithConfig extends Ap
const newTop =
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);
}, 50);

Loading…
取消
儲存