From d30693cdef8370f1dad1dede88afa71ccf11c756 Mon Sep 17 00:00:00 2001 From: Kibi Kelburton Date: Thu, 10 Sep 2026 18:44:46 +0200 Subject: [PATCH] k --- public/s/css/f0ckm.css | 1 + public/s/js/f0ckm.js | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/public/s/css/f0ckm.css b/public/s/css/f0ckm.css index e172606..268b2aa 100644 --- a/public/s/css/f0ckm.css +++ b/public/s/css/f0ckm.css @@ -18610,6 +18610,7 @@ a.lazy-thumb.filtered-upload-ghost:hover::after { /* Prevent scrolling on background document when Onara modal is active */ body.onara-modal-open { overflow: hidden !important; + scrollbar-gutter: stable !important; } /* Background main page elements (outside posts) are dimmed and softly blurred */ diff --git a/public/s/js/f0ckm.js b/public/s/js/f0ckm.js index e0f4d02..f27ebd9 100644 --- a/public/s/js/f0ckm.js +++ b/public/s/js/f0ckm.js @@ -1100,9 +1100,11 @@ window.cancelAnimFrame = (function () { targetThumb.classList.add('onara-active'); const rect = targetThumb.getBoundingClientRect(); const navbarH = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-h')) || 50; - const isInView = rect.top >= navbarH && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight); - if (!isInView) { - targetThumb.scrollIntoView({ block: 'center', inline: 'nearest', behavior: 'instant' }); + const vh = window.innerHeight || document.documentElement.clientHeight; + // If any part of the thumbnail is already visible in the viewport, do not scroll + const isVisible = rect.bottom > navbarH && rect.top < vh; + if (!isVisible) { + targetThumb.scrollIntoView({ block: 'nearest', inline: 'nearest', behavior: 'instant' }); } } }; @@ -1216,6 +1218,7 @@ window.cancelAnimFrame = (function () { '.nav-prev', '.nav-next', '#random', + '.steuerung', '.location', '.item_title', '.blahlol',