Skip to main content

Bug Tracker

Side navigation

#6575 closed bug (fixed)

Opened May 17, 2010 09:45AM UTC

Closed September 22, 2010 08:42PM UTC

Last modified March 13, 2012 09:09PM UTC

jQuery 1.4.2 conflicts with other libraries even using .noConflict() in IE and Opera

Reported by: phuc.quang Owned by:
Priority: Milestone: 1.4.3
Component: offset Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:

jQuery 1.4.2 conflicts with Prototype and Mootools even using noConflict() mode in IE (tested with IE7/IE8), and Opera (tested with 10.53). It doesn't happen with jQuery 1.3.2.

Attachments (1)
  • index68.html (0.7 KB) - added by phuc.quang May 17, 2010 09:46AM UTC.
Change History (6)

Changed May 17, 2010 03:14PM UTC by phuc.quang comment:1

Debugging further, I found:

Line 6213,

return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window?

Since the page is also having PrototypeJS, it's add "scrollTo" method to the object. So, "scrollTo" in elem is true.

About elem.document, in Opera/IE, there is always .document property for elements. So, elem.document is true.

Because of that, ("scrollTo" in elem && elem.document) will be true if there is a PrototypeJS/Mootools in Opera/IE and it will return the document size instead of element size.

Changed June 29, 2010 03:33AM UTC by dmethvin comment:2

How is jQuery conflicting here? The other libraries are changing builtin objects, interfering with jQuery. To avoid the conflict, jQuery would need to find a property that we can assure won't be added by those libraries.

Changed July 23, 2010 09:01AM UTC by Flo comment:3

Is there a good solution ?

Changed July 23, 2010 09:10AM UTC by niQo comment:4

We have the same problem using noConflict() jquery 1.4.2 and protoype 1.6.1 with IE 7 / 8.

This workaround seems to work :

Changed September 08, 2010 12:09PM UTC by phildriscoll comment:5

I have attached a couple of patches in comment 3 at

These patch dimensions.js and offset.js in the jQuery source and solve this problem.

Changed September 22, 2010 08:42PM UTC by john comment:6

component: coreoffset
resolution: → fixed
status: newclosed