View Full Version : ExtJS 3.4 bugs inside xhtml-document.

21 Sep 2012, 9:51 AM
Chrome 21 throws exception on documents with Content-Type: application/xhtml+xml in strict mode:

Uncaught Error: SYNTAX_ERR: DOM Exception 12 ext-all.js:5494

This line:

div.innerHTML = '<div style="height:30px;width:50px;"><div style="height:20px;width:20px;"></div></div><div style="float:left;background-color:transparent;">';

As I see, last div is unclosed. Closing this div fixes this bug.

Another bug is more complex. This is really Chrome bug:

document.createElement('div').insertAdjacentHTML('afterbegin', "<span ext:attr='test'></span>")
This code throws the same exception (DOM Exception 12) in Chrome 21.

insertAdjacentHTML is used by Ext.DomHelper.insertHtml()

This bug is pops while Tree using (due to ext:tree-node-id attribute)

I tried to find bug tracker but i cannot find it. I hope developers will see this post.

24 Sep 2012, 12:53 PM
The first code is technically invalid HTML so that error really isn't Ext JS' fault. You need to use valid HTML.

24 Sep 2012, 1:04 PM
This is not my code :)

This code is used in ExtJS 3.4.0 (ext-all-debug.js, line 5494)

24 Sep 2012, 1:09 PM
That's pretty bad... although I'm not getting any errors in Chrome 21.

24 Sep 2012, 1:16 PM
This error occurs in xhtml document only.

Set your document Content-Type to application/xhtml+xml

For http:// protocol send Content-Type: application/xhtml+xml http-header,
for file:// protocol set <meta http-equiv="Content-Type" content="application/xhtml+xml" />

25 Sep 2012, 4:21 AM
Could you point me to the bugtracker ?
I would like developers to fix this bug.