Anahkiasen / cookie-monster

A rehosted, cleaned up and updated version of the CookieMonster plugin.
31 stars 24 forks source link

Uncaught TypeError: Cannot read property 'style' of undefined #41

Closed alexandrdmitrievich closed 10 years ago

alexandrdmitrievich commented 10 years ago

Chrome, OS X Uncaught TypeError: Cannot read property 'style' of undefined

DosParkers commented 10 years ago

How did you recognize this error? All I get when trying to run Cookie Monster is a frozen game.

Using Chrome's developer tools to view the console, gives this output:

[!] The key "target-densitydpi" is not supported. (index):36 [x] Uncaught TypeError: Cannot read property 'style' of undefined main.js?v=1.517:2467 [x] Uncaught TypeError: Cannot read property 'style' of undefined main.js?v=1.517:2444

Here is the problem:

main.js

2443:     var tta=this.tta;
2444:     tta.style.display='block'; /* THIS LINE GIVES ERROR* /
2467:     this.tta.style.left=Game.mouseX+'px'; /* THIS LINE GIVES ERROR* /             

The first warning message about "target-densitydpi" is referenced here: http://stackoverflow.com/questions/11592015/support-for-target-densitydpi-is-removed-from-webkit

Anahkiasen commented 10 years ago

The first warning isn't important, but I can't seem to understand where the style thing comes from. I know it has something to do with tooltips but other than that... :/