Bug Tracker

Ticket #4443 (closed bug: invalid)

Opened 6 years ago

Last modified 3 years ago

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

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.

Change History

comment:1 Changed 6 years ago by acoder

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.

comment:3 Changed 4 years ago by dmethvin

  • Component changed from unfiled to core

comment:4 Changed 4 years ago by addyosmani

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

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.

Note: See TracTickets for help on using tickets.