oipuifopgdj
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user