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

IE9 - ag-grid + templateUrl crashes #521

Closed
lucaalex87 opened this issue Oct 23, 2015 · 7 comments
Closed

IE9 - ag-grid + templateUrl crashes #521

lucaalex87 opened this issue Oct 23, 2015 · 7 comments

Comments

@lucaalex87
Copy link

Is this a known issue?

If you go here:
http://www.ag-grid.com/angular-grid-cell-template/index.php

With IE, then from Dev Tools you select IE9, it will stop because of 'long running script', then it will crash.

Just curios if IE9 is not supported, or is this a defect?

I love your grid, implemented in my webapp, then found it doesn't play well with IE9 in this case :-(

(I also opened a StackOverflow thread: http://stackoverflow.com/questions/33295932/ie9-update-to-template-list-not-visible-to-callbacks )

@lucaalex87
Copy link
Author

It seems that in IE9, TemplateService.templateCache update is not visible to all code using it.

The infinite loop is:
getTemplate, (wait in line until the call ends), call ends, template added to cache, run callback, callback doesn't see the template in templateCache, creates another callback, adds it to the queue, and so on.

@lucaalex87 lucaalex87 changed the title cell templates + angularCompileRows+ IE9 == crash IE9 - update to template list not visible to callbacks Oct 23, 2015
@lucaalex87
Copy link
Author

I eventually found the issue. In IE9, the template is on responseText inside the response object.
In IE10+ and all other browsers it's on response.

So in order to fix it, in the above code, instead of:

 // response success, so process it
 this.templateCache[url] = httpResult.response;

I added:

 // response success, so process it
 //in IE9 the response is in - responseText
 this.templateCache[url] = httpResult.response || httpResult.responseText;

For future reference, adding the answer here. Had nothing to do with Angular. :)

@lucaalex87
Copy link
Author

Line 3451 in ag-grid.js.

@ceolter
Copy link
Contributor

ceolter commented Oct 23, 2015

great thanks!!!

i was in the middle of trying to figure it out

@ceolter
Copy link
Contributor

ceolter commented Oct 23, 2015

checked in, closing.

@lucaalex87
Copy link
Author

I just created a pull request with the changes :)

I guess it's redundant now and closed it :)

@lucaalex87 lucaalex87 changed the title IE9 - update to template list not visible to callbacks IE9 - ag-grid + templateUrl crashes Oct 23, 2015
@ceolter
Copy link
Contributor

ceolter commented Oct 23, 2015

sorry, i'll try and stop doing what you want to do just before you do it :)

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