Skip to main content

Bug Tracker

Side navigation

#4443 closed bug (invalid)

Opened March 28, 2009 10:54PM UTC

Closed October 09, 2010 02:37AM UTC

Last modified March 13, 2012 05:03PM UTC

Causes conflict with other addons when used in a Firefox extension

Reported by: acoder Owned by:
Priority: major Milestone: 1.4
Component: core Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

When used in a Firefox extension jQuery 1.3.2 cause incompatibilities with other extensions. This problem was not present in 1.2.6. To replicate:

1) Install Google Toolbar (https://addons.mozilla.org/en-US/firefox/addon/6249)

2) Install Smarter Wikipedia 1.1.1 (https://addons.mozilla.org/en-US/firefox/addons/versions/9825#version-1.1.1)

3) Notice that some buttons are now missing from Google Toolbar.

If you go to the jQuery file included within Smarter Wikipedia and comment out this line "Array.prototype.slice.call( document.documentElement.childNodes );" everything works again. I'm not sure what is happening -- any insight into this behavior would be appreciated.

Attachments (0)
Change History (4)

Changed March 30, 2009 06:09AM UTC by acoder comment:1

Ok, I discovered that calling "Array.prototype.slice.call( document.documentElement.childNodes );" in a script tag in an XUL overlay caused problems but calling it in a function triggered after the "load" event did not cause problems. Thus, it is possible that the reason it caused problems is that some stuff were still initializing when that piece of code was executed by jQuery.

Changed September 11, 2009 01:11PM UTC by bridget.almas comment:2

Changed June 12, 2010 02:11PM UTC by dmethvin comment:3

component: unfiledcore

Changed October 09, 2010 02:37AM UTC by addyosmani comment:4

resolution: → invalid
status: newclosed

References: #4865, #4443 (duplicates)

Both tickets describe jQuery as being the source of a compatibility issue within XUL-based FireFox extensions. This was a known issue with FireFox which was sourced back to the way it handles the document.documentElement element from within these extensions. As it transpires, there are actually conventions in the way jQuery should be loaded for extensions (this isn't a core bug).

A common practice to correctly use jQuery in extensions was to until after 'load' (using a DOMContentLoaded listener) to execute any further code as this prevented further issues related to this bug from appearing.