Skip to content

Commit c4f5962

Browse files
authored
Merge pull request #324 from vytenisstaugaitis/dev
fix(ui): use correct variable name for scroll position
2 parents 1fc3f0f + f3df9c3 commit c4f5962

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/web/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function getColumnIndexByUrlName(name: string): number {
4343
let y = 0;
4444

4545
help.addEventListener("click", () => {
46-
scrollY = window.scrollY;
46+
y = window.scrollY;
4747
document.body.style.position = "fixed";
4848
document.body.style.top = `-${y}px`;
4949
modal.showModal();
@@ -53,7 +53,7 @@ function closeDialog() {
5353
modal.close();
5454
document.body.style.position = "";
5555
document.body.style.top = "";
56-
window.scrollTo(0, scrollY);
56+
window.scrollTo(0, y);
5757
}
5858

5959
modalClose.addEventListener("click", closeDialog);

0 commit comments

Comments
 (0)