I am using a link/button to start tidio chat from my website (repjesus.com) by following this (article).
Everything works fine but the only issue is that when I close the chat, I can’t scroll on the site anymore. You can visit repjesus.com, click on the blue chat button, close it and you’ll notice what am referring to.
I did a couple of troubleshooting and I realized that if I remove the following lines…
window.tidioChatApi.on("close", function() {
window.tidioChatApi.hide();
});
I am able to scroll when I close the chat.
The code is as follows;
<a href="javascript:;" onclick="tidioChatApi.display(true);tidioChatApi.open()">Click here to open chat</a>
<script type="text/javascript">
(function() {
function onTidioChatApiReady() {
window.tidioChatApi.hide();
window.tidioChatApi.on("close", function() {
window.tidioChatApi.hide();
});
}
if (window.tidioChatApi) {
window.tidioChatApi.on("ready", onTidioChatApiReady);
} else {
document.addEventListener("tidioChat-ready", onTidioChatApiReady);
}
document.querySelector(".chat-button").addEventListener("click", function() {
window.tidioChatApi.show();
window.tidioChatApi.open();
});
})();
</script>
What could be the issue?