diff --git a/public/s/css/f0ckm.css b/public/s/css/f0ckm.css index d70354b..d05da6b 100644 --- a/public/s/css/f0ckm.css +++ b/public/s/css/f0ckm.css @@ -18662,6 +18662,9 @@ body.onara-modal-open nav.navbar { filter: none !important; pointer-events: auto !important; z-index: 10060 !important; + position: sticky !important; + top: 0 !important; + width: 100% !important; } body.onara-modal-open .global-sidebar-right { @@ -18694,6 +18697,8 @@ body.onara-modal-open #sidebar-drag-zone { -webkit-backdrop-filter: blur(5px) saturate(130%) !important; overflow-y: auto !important; overflow-x: hidden !important; + -webkit-overflow-scrolling: touch; + overscroll-behavior: contain !important; box-sizing: border-box !important; animation: onaraFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards; transition: right 0.3s ease-in-out !important; diff --git a/public/s/js/f0ckm.js b/public/s/js/f0ckm.js index ac949fa..7600d84 100644 --- a/public/s/js/f0ckm.js +++ b/public/s/js/f0ckm.js @@ -1098,7 +1098,12 @@ window.cancelAnimFrame = (function () { if (targetThumb) { targetThumb.classList.add('onara-active'); - targetThumb.scrollIntoView({ block: 'center', inline: 'nearest', behavior: 'instant' }); + 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' }); + } } }; window.updateOnaraActiveItem = updateOnaraActiveItem; @@ -5545,6 +5550,8 @@ window.cancelAnimFrame = (function () { requestAnimationFrame(() => { _scrollTicking = false; + if (document.body.classList.contains('onara-modal-open')) return; + const currentContainer = postsContainer; // Only run if THIS container is the active one and still in DOM if (!currentContainer || !document.body.contains(currentContainer)) {