PDA

View Full Version : Invalid HTML fragment inserted in the DOM?



pmarti
25 Jul 2011, 2:05 AM
I was puzzled by an error in my code when I was forcing a load on a store. It is related (or the same error) as http://www.sencha.com/forum/showthread.php?115066-Dataview-and-reloading-store-dom-error&p=628725#post628725


After some debugging I think I've found the issue, the offending instruction is


insertHtml("beforeend", "div", "<div class=\"x-mask x-mask-gray\"><div class=\"x-mask-loading\"><div class=\"x-loading-spinner\"><span class=\"x-loading-top\"></span><span class=\"x-loading-right\"></span><span class=\"x-loading-bottom\"></span><span class=\"x-loading-left\"></span></div><div class=\"x-loading-msg\">Loading...</div></div></div>") failed with exception: Error: INVALID_NODE_TYPE_ERR: DOM Range Exception 2


Commenting out the loading of the spinner (line 5556 in sencha-touch-debug-w-comment.js) solved the issue.

Attaching a screenshot of the trace.

27118

pmarti
25 Jul 2011, 2:07 AM
Adding a new link to the trace as the previous one can barely be readed

http://img268.imageshack.us/img268/2279/screenshot20110725at160.png (http://imageshack.us/photo/my-images/268/screenshot20110725at160.png/)