mirror of
https://github.com/immich-app/immich.git
synced 2025-01-07 00:50:23 -05:00
fix(web): presenting modal removes the browser's scroll ability (#7257)
* fix(web): presenting modal removes the browser's scroll ability * removed unsued code * eslint
This commit is contained in:
parent
a22bf99206
commit
73825918c0
1 changed files with 6 additions and 3 deletions
|
@ -18,15 +18,18 @@
|
||||||
if (browser) {
|
if (browser) {
|
||||||
const scrollTop = document.documentElement.scrollTop;
|
const scrollTop = document.documentElement.scrollTop;
|
||||||
const scrollLeft = document.documentElement.scrollLeft;
|
const scrollLeft = document.documentElement.scrollLeft;
|
||||||
window.addEventListener('scroll', function () {
|
|
||||||
|
/* eslint-disable unicorn/prefer-add-event-listener */
|
||||||
|
window.onscroll = function () {
|
||||||
window.scrollTo(scrollLeft, scrollTop);
|
window.scrollTo(scrollLeft, scrollTop);
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
if (browser) {
|
if (browser) {
|
||||||
window.addEventListener('scroll', () => {});
|
/* eslint-disable unicorn/prefer-add-event-listener */
|
||||||
|
window.onscroll = null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue