JavaScript
document.addEventListener('DOMContentLoaded', () => {
const observer = new MutationObserver(() => {
const modal = document.querySelector('.kadence-block-pro-modal');
if (modal && modal.parentElement !== document.body) {
// Modal ans body verschieben
document.body.appendChild(modal);
}
// Wenn modal offen ist
if (modal && modal.classList.contains('is-open')) {
modal.style.position = 'fixed';
modal.style.zIndex = '999999';
modal.style.inset = '0';
}
});
observer.observe(document.body, {
childList: true,
subtree: true,
attributes: true,
attributeFilter: ['class']
});
});