Bug Tracker

Modify

Ticket #8710 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 2 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.