[Bug] GatsbyJS. Chatbot only loads if user puts page in background or hovers over icon.
Carlo-Defilippis opened this issue ยท 2 comments
Carlo-Defilippis commented
๐๐ป Hi there! Chat only loads if the user puts the window in the background or hovers over the icon on GatsbyJS. I have included a codesandbox below of a Gatsby starter template with react-live-chat-loader installed to demonstrate this issue.
Describe the bug
Not properly detecting idle period while using react-live-chat-loader with Gatsby JS
How To Reproduce
Steps to reproduce the behavior:
- Go to 'https://codesandbox.io/s/drift-gatsby-starter-bugtest-v8iys4'
- Click the open in new window popup when prompted to view the main page.
- Once site is loaded, sit idle for a couple minutes and nothing happens, but if you hover over the icon OR put the page in the background you will eventually hear the chatbot activating.
Expected behavior
Chatbot loads after set idle period(setting idlePeriod has no effect)
benschwarz commented
@Carlo-Defilippis From what I can see, you haven't included the wrapping LiveChatLoaderProvider
element as described in the README. It might be worth adding that and retrying your test.
Carlo-Defilippis commented
@benschwarz it is located in the gatsby-browser.js which wraps every page.