chatwoot
chatwoot copied to clipboard
on iOS devices - websocket connection is not re-established in the chat widget on window focus
Describe the bug
When integrating the chat widget, I noticed an issue on iOS where the websocket connection used by the chat widget is not re-established when the browser loses and regains focus. This leads to inconsistent behaviour where messages that were sent while the browser was out of focus and then regains it don't appear UNTIL you reload the website.
To Reproduce
Steps to reproduce the behavior:
- Start a conversation on mobile Safari on iOS using the web widget.
- Move the browser to the background, or try switching to another app
- Reply from the agent dashboard to yourself
- On the phone, return to the website where web widget is used and you'll notice that the the messages you sent from the dashboard aren't there. You have to reload the website for these messages to pop up.
This issue doesn't appear 100% percent of the time, but it DOES appear fairly often
Expected behavior
WebSocket connection should be re-established when the iOS mobile browser loses and regains focus.
Screenshots
N/A
Browser logs
N/A
Server logs
N/A
Environment
Self hosted heroku installation.
Desktop (please complete the following information): N/A
Smartphone (please complete the following information):
- Device: iPhone 12
- OS: iOS 15.4
- Browser Safari
- Version latest
Having the same problem. It quite affects the user experience on iOS devices.
@fobos531 @fifi98 Thanks for reporting. We will take a look