From 85dc3e5433ed88ed2fc443a532f4ce21c19f6a09 Mon Sep 17 00:00:00 2001 From: Lars Date: Tue, 8 May 2018 22:09:37 +0200 Subject: [PATCH] showImages conserveMemory: Don't unload when scrolling horizontally --- lib/modules/showImages.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/modules/showImages.js b/lib/modules/showImages.js index 90e6fb5968..14d400f467 100644 --- a/lib/modules/showImages.js +++ b/lib/modules/showImages.js @@ -592,7 +592,8 @@ function enableConserveMemory() { // $FlowIssue `mozFullScreenElement` is not recognized const fullscreenActive = () => !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement: any); - const rootMargin = `${100 * (parseInt(module.options.bufferScreens.value, 10) || 2)}%`; + // x-axis is set to 100000% in order to not unload images when scrolling too far horizontally + const rootMargin = `${100 * (parseInt(module.options.bufferScreens.value, 10) || 2)}% 100000%`; const mediaMap = new WeakMap(); const ioMedia = new IntersectionObserver(entries => {