This project is archived and is in readonly mode.

Bug in IE with HTML5 elements
Reported by Ryan Mitchell | April 29th, 2011 @ 01:12 PM | in 1.4.0 (closed)
Hello
I've been struggling with a bug in Mootools 1.3 (which isn't there in 1.2) with regards to HTML5 elements. This only seems to occur on IE8, and is preventing us from using 1.3 instead of 1.2.6
When I use a function like getElement, or getElements, on an element that contains HTML5 elements I get the following errors:
Invalid procedure call or argument - line 2088, character 47
Object doesn't support this property or method - line 5327,
character 2
I tracked it down to this code:
if (this.starSelectsClosedQSA) for (i = 0; node = nodes[i++];){
if (node.nodeName > '@' && !(hasOthers && uniques[this.getUID(node)])) found.push(node);
} else for (i = 0; node = nodes[i++];){
if (!(hasOthers && uniques[this.getUID(node)])) found.push(node);
}
It seems to be the nodes[i++] thats causing the problem.
Changing the code to the following seems to fix the problem.
if (this.starSelectsClosedQSA){
for (i = 0; i<nodes.length;i++){
node = nodes[i];
if (node.nodeName > '@' && !(hasOthers && uniques[this.getUID(node)])) found.push(node);
}
} else {
for (i = 0; i<nodes.length;i++){
node = nodes[i];
if (!(hasOthers && uniques[this.getUID(node)])) found.push(node);
}
}
Any chance of pulling this change in? Its a really frustrating issue, and seems so small and insignificant!
Thanks,
Ryan
Comments and changes to this ticket
-
Arian May 2nd, 2011 @ 01:02 AM
- State changed from new to open
- Milestone set to 1.4.0
- Assigned user set to Thomas Aylott
- Milestone order changed from 914 to 0
Does adding html5shim (http://code.google.com/p/html5shim/) to your page fix the problem?
-
Ryan Mitchell May 2nd, 2011 @ 07:52 AM
Unfortunately not, I was already using the shim code on the page.
-
Andrew Sutherland May 14th, 2011 @ 09:31 PM
Getting same error in IE8 when using this selector:
$$('a[rel*=facebox]')
-
-
ibolmo January 19th, 2012 @ 09:34 AM
- State changed from open to invalid
Moved to Github Issues: https://github.com/mootools/mootools-core/issues/2231
Please use Github Issues, since Lighthouse has been deprecated.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »