mirror of
https://github.com/immich-app/immich.git
synced 2024-11-24 08:52:28 +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) {
|
||||
const scrollTop = document.documentElement.scrollTop;
|
||||
const scrollLeft = document.documentElement.scrollLeft;
|
||||
window.addEventListener('scroll', function () {
|
||||
|
||||
/* eslint-disable unicorn/prefer-add-event-listener */
|
||||
window.onscroll = function () {
|
||||
window.scrollTo(scrollLeft, scrollTop);
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
if (browser) {
|
||||
window.addEventListener('scroll', () => {});
|
||||
/* eslint-disable unicorn/prefer-add-event-listener */
|
||||
window.onscroll = null;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user