Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaunchDarkly's js-client is closing browser tabs #119

Closed
Sawtaytoes opened this issue Oct 17, 2018 · 3 comments
Closed

LaunchDarkly's js-client is closing browser tabs #119

Sawtaytoes opened this issue Oct 17, 2018 · 3 comments

Comments

@Sawtaytoes
Copy link

All of a sudden, we started receiving reports of clients having our app close the browser on iPads and in Chrome after logging in. We didn't add any code to intentionally close the browser, nor should it be possible.

Calling window.close(), you see this message:

Scripts may close only the windows that were opened by it.

Today, I saw that same message coming from ldclient.es.js for this line of code:

o.disconnect=function(){clearTimeout(l),l=null,close()}

close() here refers to window.close().

I wonder if the browser can get into a strange state where window.close() would actually close the tab you're in.

I found the same line here:
https://github.com/launchdarkly/js-client/blob/8e9b46037f253c25bdbbb3ba73aad36ee966c636/src/Stream.js#L23

Did you mean to call es.close() or stream.close() instead?

Also, when would a fix be put out? I'd like to get this updated asap for our users.

@apucacao
Copy link
Contributor

Hi @Sawtaytoes,

Thanks for reporting this — I’m sorry for the trouble and frustration that this must cause.

We want to resolve this as soon as possible, so we’re working on a fix as we speak. I’ll keep you posted and let you know as soon as we’ve released.

Alexis

@apucacao
Copy link
Contributor

@Sawtaytoes — we just released 2.7.2 with a fix for this bug.

@Sawtaytoes
Copy link
Author

Thanks! I'll pull it in. Appreciate the quick response and fix.

eli-darkly added a commit that referenced this issue Dec 7, 2018
10. abstract out local storage mechanism
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants