#12569 closed defect (wontfix)
IE8 bug causing js execution to halt in _Templated.xd.js
Reported by: | Dan Farrow | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Dijit | Version: | 1.5 |
Keywords: | ie8 firstChild appendChild invalid argument error | Cc: | |
Blocked By: | Blocking: |
Description
hi all, I've been pulling out my hair trying to fix an Invalid argument error message in IE8 which is stopping my dijits from working.
The problem occurs in dijit/_Templated.xd.js, specifically the _fillContent function:
while(source.hasChildNodes()){
dest.appendChild(source.firstChild);
}
In IE8's debugger, source.hasChildNodes() returns true, but source.firstChild evaluates to null, hence the Invalid argument error.
Simple test html here: http://scsys.co.uk:8002/95245
Thanks in advance for any help anybody can provide on this
Dan
Attachments (1)
Change History (5)
Changed 10 years ago by
Attachment: | 12569.html added |
---|
comment:1 Changed 10 years ago by
Thanks for the test case. Hmm, that's a strange one, it only seems to happen with that <p> → <form> → <dl> hierarchy.
I tried changing the code to:
while(source.firstChild){ dest.appendChild(source.firstChild); }
However, that doesn't really solve your problem as it won't copy any of the content from inside the <form> node. Referencing source.childNodes[0]
instead of source.firstChild
seems to work:
while(source.hasChildNodes()){ dest.appendChild(source.childNodes[0]); }
...although I'm worried it would be slower.
It might make sense for you to redesign your HTML to avoid that problem?
comment:2 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Since this is such a corner case, I'm going to close the ticket as wontfix. You can workaround the problem by redefining _fillContent or by changing your markup to not have that specific <p> → <form> → <dl> hierarchy.
comment:3 follow-up: 4 Changed 10 years ago by
hi bill, following up this particular issue got pushed to the back of my (long) queue so apologies for not responding sooner
Yes, removing the surrounding <p> tags solves it, and I agree it's very much a corner case
Thanks so much for your help Dan
comment:4 Changed 10 years ago by
Replying to sqrbrkt: I meant - "Thanks so much for your help, Dan"
simplified test case