mirror of
https://github.com/immich-app/immich.git
synced 2024-11-28 09:33:27 +02: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
@ -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 New Issue
Block a user