feat: auto-close chat panel on scroll

This commit is contained in:
oliver
2026-04-24 14:00:25 -03:00
parent d4f81c03cd
commit 30e5217d9a
+11 -2
View File
@@ -1862,7 +1862,7 @@
data-mf-animation-delay="280"
data-mf-animation-once="true"
>
<span>&copy; 2025 my-biz.app &mdash; All rights reserved.</span>
<span>&copy; 2026 my-biz.app &mdash; All rights reserved.</span>
<div class="footer-legal">
<a href="#">Privacy</a>
<a href="#">Terms</a>
@@ -2131,6 +2131,15 @@
if (e.key === "Escape" && panel.classList.contains("open"))
closePanel();
});
/* close on scroll */
window.addEventListener(
"scroll",
function () {
if (panel.classList.contains("open")) closePanel();
},
{ passive: true },
);
})();
</script>
@@ -2384,7 +2393,7 @@
.catch(function () {
fire(null);
});
}, 30000);
}, 15000);
})();
</script>