Bug Tracker

Opened 11 years ago

Closed 11 years ago

#8710 closed bug (invalid)

getElementById bug with firefox 3.0 and mootools.js

Reported by: ad.turcu@… Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:

Description

I hve problem with website that has mootools.js library included also. As you might know, mootools overwrites getElementById from dom, and it is a problem.

In order to make my jquery 1.5.1 to work i replaced every getElementById from jquery.min.js with a copy of it from dom, directly:

Modification 1: replaced "getElementById" with "_getElementById" Copy getElementById from Document object in DOM, because mootools overwrites getElementById function. This means that this jquery.js file should be loaded before mootools.js. Problem in FF 3.0. document._getElementById = document.getElementById;

As you can see I copied getElementById from DOM into _getElementById variable that is stored also in dom and I replaced "getElementById" with "_getElementById" in jquery.min.

This does work and you can test on eset.de website. The jquery.js there has this modification and if you remove it and replace back to original jquery, it will give an error in firefox 3.0.

Note. This only appllies in firefox 3.0. In jquery 1.4.2 was happening in all browsers, but now jquery 1.5.1 resolves the majority of them.

Hope this helps. If you have questions feel free to ask me, because I want this bug resolved also.

Note 2. I use NoConflict with my jquery as you can see on eset.de in jquery.js file.

Tested all in WINDOWS OS

Change History (1)

comment:1 Changed 11 years ago by dmethvin

Resolution: invalid
Status: newclosed

Please report this to mootools, this is not a jQuery problem because we can't guard against the native functionality being changed.

Note: See TracTickets for help on using tickets.