Page not scrollable after minimizing chat window

Hey,

So I have this weird issue with the widget on mobile.

I start with:

Tawk_API.autoStart = false;

And then when a user clicks on a button on the page I call

window.Tawk_API.start();
window.Tawk_API.maximize();

and it all works perfectly.

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:

height: 100% !important; min-height: 100% !important; max-height: 100% !important; width: 100% !important; min-width: 100% !important; max-width: 100% !important; overflow: hidden !important; position: fixed !important;

Is that anything me doing wrong, or is this a bug?

Hello,

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.

I hope the information may helps you.