<div x-data x-init="$nextTick(() => {
let attempts = 0;
function scrollToBottom() {
let modalContent = document.querySelector('.fi-modal-slide-over-window');
if (modalContent) {
console.log('Modal found:', modalContent);
console.log('Scroll Height:', modalContent.scrollHeight);
modalContent.scrollTo({ top: modalContent.scrollHeight, behavior: 'smooth' });
setTimeout(() => {
console.log('Updated ScrollTop:', modalContent.scrollTop);
}, 50);
} else if (attempts < 10) {
attempts++;
console.warn(`Attempt ${attempts}: Modal not found. Retrying...`);
setTimeout(scrollToBottom, 100);
} else {
console.error('Modal not found after multiple attempts');
}
}
setTimeout(scrollToBottom, 300);
});">
</div>
<div x-data x-init="$nextTick(() => {
let attempts = 0;
function scrollToBottom() {
let modalContent = document.querySelector('.fi-modal-slide-over-window');
if (modalContent) {
console.log('Modal found:', modalContent);
console.log('Scroll Height:', modalContent.scrollHeight);
modalContent.scrollTo({ top: modalContent.scrollHeight, behavior: 'smooth' });
setTimeout(() => {
console.log('Updated ScrollTop:', modalContent.scrollTop);
}, 50);
} else if (attempts < 10) {
attempts++;
console.warn(`Attempt ${attempts}: Modal not found. Retrying...`);
setTimeout(scrollToBottom, 100);
} else {
console.error('Modal not found after multiple attempts');
}
}
setTimeout(scrollToBottom, 300);
});">
</div>