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

Internet Explorer IE9: _emberEnvironment.environment.global returns undefined #14006

Closed
darylalexjohnson opened this issue Aug 2, 2016 · 9 comments · Fixed by #14229
Closed

Comments

@darylalexjohnson
Copy link

darylalexjohnson commented Aug 2, 2016

After upgrading one of our apps to 2.7, it failed to load in IE9. I reproduced the issue by installing a new sandbox app with v2.7. The error is thrown in supportsHashChange with global being undefined.

function supportsHashChange(documentMode, global) {
    return 'onhashchange' in global && (documentMode === undefined || documentMode > 7);
  }

Reverting to 2.6 resolves the issue.

@pixelhandler
Copy link
Contributor

@darylalexjohnson can you share the repository you used to reproduce the issue, here? It will be helpful for confirming and debugging the issue.

@nmcclay
Copy link

nmcclay commented Aug 8, 2016

I can confirm this happens with a vanilla 2.7.0 ember init on IE9. I can throw up a repo but it would just be a vanilla ember init repo.

SCRIPT5007: Invalid operand to 'in': Object expected 
vendor.js, line 37313 character 5

@jcbvm
Copy link

jcbvm commented Aug 9, 2016

I can also confirm this. Try to see the live demo on IE9 of a simple ember app running 2.7: https://github.com/zoltan-nz/library-app.

Like @darylalexjohnson was pointing out, the global param is undefined here.

@rwjblue
Copy link
Member

rwjblue commented Aug 9, 2016

Hmm. Our test suite runs against IE9 and seems to be passing. Does someone have a minute to try and submit a failing test case?

I wonder if this is coming from Ember itself or something that is included by default in a new ember-cli app. I'll try to get my IE9 VM working again to test, but it may take a few days (doing a bit of vacation...)

@jcbvm
Copy link

jcbvm commented Aug 9, 2016

@rwjblue If you have IE11 running, you can also simulate IE9, which is giving you more useful console output also. Will see if I can create a failing test if I have some time tomorrow (also a bit of vacation ;) )

@oscarni
Copy link

oscarni commented Aug 25, 2016

I can confirm that this happens when visiting https://ember-twiddle.com/ , which is currently on ember 2.7.0. Tested with IE9 on windows 7 through Browserstack.

@vincentlol
Copy link

vincentlol commented Aug 29, 2016

This is due to a rename from environment.global to environment.window in this commit
93f1a8f

However this still tries to use environment.global, which is no longer defined
https://github.com/emberjs/ember.js/blob/v2.7.0/packages/ember-routing/lib/location/auto_location.js#L73

@jcbvm
Copy link

jcbvm commented Sep 7, 2016

Can someone take a look at this, seems crucial to me.

@jcbvm
Copy link

jcbvm commented Sep 8, 2016

Thx @rwjblue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants