CaliStyle / ng-intercom

Angular 7+ Wrapper for Intercom.com
MIT License
54 stars 46 forks source link

Beta.11 intercom no longer opens/loads #32

Closed matt-filion closed 6 years ago

matt-filion commented 6 years ago

It does not appear to be calling the l() function within the util/load-intercom.ts file anymore.

wbhob commented 6 years ago

Do you have any other information? Errors in the console, or something that would lead you to believe that that is the case? The code has not changed for that function, and it is ported directly from Intercom.

matt-filion commented 6 years ago

When I changed back to .10 it worked. I'll dig a bit deeper to see what I can find. In the latest version I could not place what is calling the l() function. Do you know what is "supposed" to be invoking it?

On Jan 24, 2018 5:15 PM, "Wilson Hobbs" notifications@github.com wrote:

Do you have any other information? Errors in the console, or something that would lead you to believe that that is the case? The code has not changed for that function, and it is ported directly from Intercom.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CaliStyle/angular2-intercom/issues/32#issuecomment-360328913, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUplLt3EMvso6qM9cCuiGfnHymHderpks5tN9W0gaJpZM4RsAI6 .

wbhob commented 6 years ago

window.onLoad should be invoking it in compatible browsers, if not, it adds an eventlistener for load.

MarkusPint commented 6 years ago

I can confirm this. It happens on beta.12 too and switching back to beta.10 fixes it. There are no errors in console.

worldspawn commented 6 years ago

I'm using beta11 on one site without issue and on another using beta11 the load event has fired at the time the intercom runs loadIntercom. Nfi why, it's all initialised in the same way. Only thought I had it something to do with how the modules were bundled (for lazy loading).

Could we perhaps do something like:

else {
  if (w.document.readyState === 'complete')
     l();
  else {
     w.addEventListener('load', l, false);
  }
}

Though when i try that i get this in my log output image

sijmenvos commented 6 years ago

I can also confirm this, when using 1.0.0-beta.10 Intercom loads, on 1.0.0-beta.13 it doesn't either.

scott-wyatt commented 6 years ago

Marking this as a deprecated issue. Feel free to reopen another issue if this persists in a later version.