OdinaSpb / jstree

Automatically exported from code.google.com/p/jstree
0 stars 0 forks source link

HTML trees don't work on trunk with application/xhtml+xml #902

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Try to render a simple HTML tree using Chrome when the mimetype is 
application/xhtml+xml to get strict DOM validation. 

The jstree init step fails with a DOM violation exception, so I assume it is 
trying something which isn't valid XHTML.

Seen at rev 236 on trunk.

Original issue reported on code.google.com by peterhar...@gmail.com on 22 Feb 2011 at 12:20

GoogleCodeExporter commented 9 years ago
Log from the Chrome profiler:

Uncaught Error: INVALID_STATE_ERR: DOM Exception 11
c.extend.cleanjquery-1.4.3.min.js:122
c.buildFragmentjquery-1.4.3.min.js:120
c.fn.extend.domManipjquery-1.4.3.min.js:118
c.fn.extend.appendjquery-1.4.3.min.js:113
c.fn.extend.htmljquery-1.4.3.min.js:116
$.jstree.plugin.__init.data.checkbox.nouijquery.jstree.js:2699
c.b.extend.readyjquery-1.4.3.min.js:28
c.tjquery-1.4.3.min.js:36
jquery-1.4.3.min.js:122

Original comment by peterhar...@gmail.com on 22 Feb 2011 at 12:23

GoogleCodeExporter commented 9 years ago
If you delete ...

        m = $("<div />").attr({ id : "jstree-marker" }).hide().html("»")
            .bind("mouseleave mouseenter", function (e) { 
                m.hide();
                ml.hide();
                e.preventDefault(); 
                e.stopImmediatePropagation(); 
                return false; 
            })
            .appendTo("body");

... it seems to work. So something suspect about this (sorry I can't be more 
help - I'm not really a JS hacker).

Original comment by peterhar...@gmail.com on 22 Feb 2011 at 12:29

GoogleCodeExporter commented 9 years ago
The problem is with the .html("»") part, if you delete it it works. Still 
investigating...

Original comment by v.maggi...@gmail.com on 24 Jan 2013 at 11:43

GoogleCodeExporter commented 9 years ago
Update: just substitute with .html("»") and it should work!

Original comment by v.maggi...@gmail.com on 24 Jan 2013 at 11:57