k
This commit is contained in:
@@ -18610,6 +18610,7 @@ a.lazy-thumb.filtered-upload-ghost:hover::after {
|
|||||||
/* Prevent scrolling on background document when Onara modal is active */
|
/* Prevent scrolling on background document when Onara modal is active */
|
||||||
body.onara-modal-open {
|
body.onara-modal-open {
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
|
scrollbar-gutter: stable !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Background main page elements (outside posts) are dimmed and softly blurred */
|
/* Background main page elements (outside posts) are dimmed and softly blurred */
|
||||||
|
|||||||
@@ -1100,9 +1100,11 @@ window.cancelAnimFrame = (function () {
|
|||||||
targetThumb.classList.add('onara-active');
|
targetThumb.classList.add('onara-active');
|
||||||
const rect = targetThumb.getBoundingClientRect();
|
const rect = targetThumb.getBoundingClientRect();
|
||||||
const navbarH = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-h')) || 50;
|
const navbarH = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-h')) || 50;
|
||||||
const isInView = rect.top >= navbarH && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight);
|
const vh = window.innerHeight || document.documentElement.clientHeight;
|
||||||
if (!isInView) {
|
// If any part of the thumbnail is already visible in the viewport, do not scroll
|
||||||
targetThumb.scrollIntoView({ block: 'center', inline: 'nearest', behavior: 'instant' });
|
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-prev',
|
||||||
'.nav-next',
|
'.nav-next',
|
||||||
'#random',
|
'#random',
|
||||||
|
'.steuerung',
|
||||||
'.location',
|
'.location',
|
||||||
'.item_title',
|
'.item_title',
|
||||||
'.blahlol',
|
'.blahlol',
|
||||||
|
|||||||
Reference in New Issue
Block a user