oipuifopgdj

This commit is contained in:
2026-09-10 18:32:04 +02:00
parent e2e4feeea0
commit 4fbabace79
2 changed files with 13 additions and 1 deletions
+8 -1
View File
@@ -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)) {