The problem is, when chat is maximized and user clicks on the X button on the widget itself to hide / end chat, chat window goes hidden, but it leaves inline styling on body element that prevents the scroll:
It seems like the issue you’re experiencing with the Tawk_API chat widget is related to the inline styling that remains on the body element after the chat is minimized, which prevents the page from scrolling. This could be due to the way the widget interacts with the page’s CSS when it’s closed.
To resolve this, you might want to try manually removing the inline styles from the body element when the chat is minimized. You can do this by adding an event listener for the chat minimize event and then using JavaScript to remove the styles. Here’s a code snippet that might help:
// Add an event listener for the chat minimize event
window.Tawk_API.onChatMinimized = function() {
// Remove the inline styles from the body element
document.body.style.height = '';
document.body.style.minHeight = '';
document.body.style.maxHeight = '';
document.body.style.width = '';
document.body.style.minWidth = '';
document.body.style.maxWidth = '';
document.body.style.overflow = '';
document.body.style.position = '';
};
This code will reset the styles on the body element to their default values when the chat is minimized, allowing the page to scroll again. Make sure to place this code after the Tawk_API embed code on your page.