valeriogalano / jquery-tree

jQuery Tree Widget
https://web.archive.org/web/20161106222353/http://www.daredevel.com/jquery-tree-widget
MIT License
118 stars 51 forks source link

Stackoverflow in IE8 #9

Open AlexKeySmith opened 12 years ago

AlexKeySmith commented 12 years ago

When running index.html in IE8 on XP SP3, I get a stackoverflow error on line 16 of jquery.min.js

If I run with the un-minified version of jquery https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js

In debugging mode it breaks at the finally statement on line 1011.

Looking into the call stack it seems to die on jQuery.ready() which is interesting, but I'm guessing this is just jquery handling it's own error gracefully.

Out of debugging mode, it breaks on line 520 with a stack overflow error.

Which is

if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {

Hope it helps, keep up the good work.

-thanks Alex.

valeriogalano commented 12 years ago

Hello Alex,

thanks for your report.

I'll work on this asap.

Regards, Valerio

AlexKeySmith commented 12 years ago

Cool, that was a quick response!

tresortshishi commented 12 years ago

Hi all on IE 8 win 7 i have the same problem . a window alert display "Stack overflow at line :2" .

tresortshishi commented 12 years ago

It seems it's your function _treecollapseInitizeNodes(li) produces a undefined loop on ie cause you use eval .

_initializeNode: function(li) { li.children('span:last').addClass(this.options.core.widgetBaseClass + '-label'); // call each active component initialize method for (var i in this.options.components) { var componentInitializeNode = 'this._tree' + this.options.components[i] + 'InitializeNode(li)'; eval(componentInitializeNode); } }

sherzberg commented 11 years ago

Any progress on this? I am also running into this issue. Thanks!

valeriogalano commented 11 years ago

I removed eval from code, but this doesn't fix the issue.

It seems to be a jQuery bug related to IE8.

I opened a ticket about the issue http://bugs.jquery.com/ticket/12670

sherzberg commented 11 years ago

Looks like they closed the bugs and defered to jquery-ui: http://bugs.jquery.com/ticket/12669

Can see about adding the bug to jquery-ui? Thanks!

valeriogalano commented 11 years ago

Just opened. I'll complete issue with code asap.

valeriogalano commented 11 years ago

If someone wants to contribute, the ticket is the following:

http://bugs.jqueryui.com/ticket/8678

sherzberg commented 11 years ago

Not sure if this helps or not, but if you only use one of the components (checkbox, collapse, ...) it works just fine. I need to use checkbox with collapse, so I will start to dig into why you cant have more then one.

valeriogalano commented 11 years ago

Yes. It's the same conclusion I come to.

I think it's a IE8 bug.

I'm planning to rewrite component's loading method, but it will take a lot of time! And at the moment I have no time... :(