question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intercom opens automatically when state is completed

See original GitHub issue

If I understood the code correctly, when Intercom finishes loading https://github.com/calibreapp/react-live-chat-loader/blob/b80203308a7c106d079239a501b82b6b372a7143/src/hooks/useChat.ts#L89 state will be set to complete and Intercom is opened automatically without user interaction.

Call to setting complete state: https://github.com/calibreapp/react-live-chat-loader/blob/ab41513a6b29adebefef92415c4800948ce2f7a3/src/providers/intercom.ts#L57

This is very bad UX since on mobile Intercom pops up and takes the whole viewport when opened. Therefore, without any notice a new screen pops up for the user on mobile. I think it should be out of scope of this package to automatically open the Intercom window without user interaction involved or people calling window.Intercom('show') on their code manually.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jaska120commented, Jun 1, 2021

@mxstbr Sorry for the delay. I did “fix” it by moving Provider lower down in the tree. Basically, the parent component for LiveChat component (eg. Intercom) is now the LiveChatProvider on our setup. This ensures that the provider will be remounted while navigating and therefore the state I am mentioning on my first post will get reset.

We should, however, be able to to add the Provider higher up in the tree, but it is a workaround for now until somebody has time to fix the state issue especially on Intercom component.

0reactions
mxstbrcommented, Jun 1, 2021

I think I fixed it by setting key={location.pathname}, however it’s really difficult to verify as it only happens randomly. 😕

Read more comments on GitHub >

github_iconTop Results From Across the Web

Intercom Messenger automatically opening on page reload
Intercom Messenger automatically opening on page reload. Has anyone else experienced the Intercom launcher opening on page reload at all?
Read more >
Update ticket state | Help Center - Intercom
Resolve and close - This will close the conversation and automatically update the ticket state to “Resolved”. Note: If a Conversations Data Attribute...
Read more >
Real-time messaging explained | Help Center - Intercom
When a customer starts a new conversation, their message is marked as "Not ... Important: Message "Seen" states are not displayed in a...
Read more >
Tickets explained | Help Center - Intercom
Tickets open up a completely new way to use Intercom ... Delegate tasks that must be completed by back office teams before the...
Read more >
Automate ticket workflows with rules | Help Center - Intercom
Use an action to automatically set ticket states based on a rule. To get started, go to Settings > Inbox automation > Inbox...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found