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 : Object doesn't support property or method 'contains' #2039

Closed
pkurimella opened this issue Aug 25, 2015 · 9 comments
Closed

Comments

@pkurimella
Copy link

Getting this error in Internet Explorer only. This started happening after the new version was released.
image

@grabks
Copy link

grabks commented Aug 25, 2015

Hi, it looks like you might be using a Material Chart or perhaps Gantt? Can you please link to a jsfiddle reproducing this issue?

@pkurimella
Copy link
Author

I'm unable to reproduce this issue in jsfiddle. The condition this happens is I have 3 tabs and i'm loading the graphs on tab select. The first graph is the one with the tab selected by default and renders fine. When I switch to other two tabs and try to load the graph I get the above error.

Another question I have is do I have to load visualization package for each graph independently?

@pkurimella pkurimella reopened this Aug 26, 2015
@grabks
Copy link

grabks commented Aug 26, 2015

You still haven't mentioned which chart you're using.

If this is the issue that I'm thinking of, it would occur on subsequent redraws, so you should be able to work around the issue either by a) drawing all the charts and then setting display: none on the relevant ones, or b) by reinstantiating the charts instead of just redrawing them.

You should only have one google.load('visualization', ...) call on your page. Multiple calls might cause undefined behavior or unforeseen issues.

@pkurimella
Copy link
Author

Please run the below in Internet Explorer. I could reproduce the issue in IE
https://jsfiddle.net/fjd76a49/3/

@pkurimella
Copy link
Author

I tried loading multiple graphs at once and looks like the second graph load always errors out in Internet Explorer. Ref https://jsfiddle.net/fjd76a49/4/

@grabks
Copy link

grabks commented Aug 26, 2015

Ah, so this is the issue that I was thinking of. Unfortunately, this is a known bug in v42. It will be fixed when we release v43 (which should be in a week or so). In the meanwhile, you can switch your implementation to use the frozen version v41. Here is an example of doing that: https://jsfiddle.net/fjd76a49/6/

@pkurimella
Copy link
Author

Thanks it worked. I'm assuming this (frozen v41) would future proof us from any bugs in the newer releases?

@dlaliberte
Copy link
Collaborator

We won't be changing the frozen v41, so it should stay the same. However, we are changing the loader, so this could affect previous versions (negatively), though we will certainly try hard to avoid that.

@rjbathgate
Copy link

Hi

I am experiencing exactly the same issue here, when showing two graphs.

Using: google.load("visualization", "1.1", {packages:["bar"]});)

in IE11 - the second graph doesn't load and returns:

Object doesn't support property or method 'contains'.

I swapped out the second graph to use https://www.gstatic.com/charts/loader.js and google.charts.load('41', {packages: ['corechart', 'bar']}); however that caused a few other bugs (on hover of columns etc).

Should this be "fixed" by now (i.e. is v43 out yet?) or is something else going on for me?

Thanks

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

4 participants