feat: auto-close chat panel on scroll
This commit is contained in:
+11
-2
@@ -1862,7 +1862,7 @@
|
|||||||
data-mf-animation-delay="280"
|
data-mf-animation-delay="280"
|
||||||
data-mf-animation-once="true"
|
data-mf-animation-once="true"
|
||||||
>
|
>
|
||||||
<span>© 2025 my-biz.app — All rights reserved.</span>
|
<span>© 2026 my-biz.app — All rights reserved.</span>
|
||||||
<div class="footer-legal">
|
<div class="footer-legal">
|
||||||
<a href="#">Privacy</a>
|
<a href="#">Privacy</a>
|
||||||
<a href="#">Terms</a>
|
<a href="#">Terms</a>
|
||||||
@@ -2131,6 +2131,15 @@
|
|||||||
if (e.key === "Escape" && panel.classList.contains("open"))
|
if (e.key === "Escape" && panel.classList.contains("open"))
|
||||||
closePanel();
|
closePanel();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/* close on scroll */
|
||||||
|
window.addEventListener(
|
||||||
|
"scroll",
|
||||||
|
function () {
|
||||||
|
if (panel.classList.contains("open")) closePanel();
|
||||||
|
},
|
||||||
|
{ passive: true },
|
||||||
|
);
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -2384,7 +2393,7 @@
|
|||||||
.catch(function () {
|
.catch(function () {
|
||||||
fire(null);
|
fire(null);
|
||||||
});
|
});
|
||||||
}, 30000);
|
}, 15000);
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user