Skip to main content

Bug Tracker

Side navigation

#12407 closed bug (invalid)

Opened August 27, 2012 01:30PM UTC

Closed August 30, 2012 11:01AM UTC

Last modified August 30, 2012 12:46PM UTC

IE8 - getElementsByClassName not supported

Reported by: aleksandra.desmurs@baobaz.com Owned by: aleksandra.desmurs@baobaz.com
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.0
Keywords: Cc:
Blocked by: Blocking:
Description

I was implementing a slider based on newest jQuery, jQuery Cycle plugin and Hashchange.

It worked everywhere except for IE8. After some investigation I stumbled upon the error linked to getElementsByClassName. I removed this part of the jQuery Core:

// Speed-up: Sizzle(".CLASS")

} else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) {

push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );

return results;

}

Since I removed this everywhitng works well on all browsers (IE7 and up, FF, Chrome)

Cheers

Attachments (0)
Change History (4)

Changed August 27, 2012 02:22PM UTC by timmywil comment:1

owner: → aleksandra.desmurs@baobaz.com
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/. Open the link and click to "Fork" (in the top menu) to get started.

Changed August 30, 2012 07:20AM UTC by anonymous comment:2

I can't reproduce the bug on jsFiddle - I suppose it was a more complex problem.

I stumbled upon this problem on a very big project, an e-commerce site. I was doing a slider on a CMS page. We have loads of jQuery, prototype and other JavaScript on that page. I think this ticket can be closed as the bug was more likely linked to the characteristics of our site than jQuery itself.

Changed August 30, 2012 11:01AM UTC by mikesherov comment:3

resolution: → invalid
status: pendingclosed

Changed August 30, 2012 12:46PM UTC by dmethvin comment:4

Most likely it was Prototype, some versions incorrectly shim getElementsByClassName. But that's not something we can fix, because it's not our bug. In general it's a bad idea to use multiple libraries on the same page like that anyway.

http://www.prototypejs.org/api/element/getElementsByClassName