1
0
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:
Alex 2024-02-20 14:02:01 -06:00 committed by GitHub
parent a22bf99206
commit 73825918c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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>