Bug Tracker

Modify

Ticket #7011 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

noConflict is broken by Commit #8effe3a7dee91c833cc1774646da9d743600c64c

Reported by: rwaldron Owned by:
Priority: Milestone: 1.4.3
Component: unfiled Version: 1.4.2
Keywords: Cc:
Blocking: Blocked by:

Description

Check out:

 http://github.com/jquery/jquery/commit/8effe3a7dee91c833cc1774646da9d743600c64c#diff-2

This commit breaks jQuery.noConflict(true) - jQuery/_jQuery is actually undefined when it is called.

Removing the closure fixes the problem

Also - the unit tests are not passing because of this.

Change History

comment:2 Changed 3 years ago by rwaldron

Additionally, here is the test case that shows the breakage:

 http://jsbin.com/ujije4/9

comment:3 Changed 3 years ago by cowboy

The problem is that because the var jQuery declaration in  core.js happens inside a core-specific closure, when any non-core jQuery function tries to resolve jQuery it must go all the way up the scope chain to window to get it, which explodes all over the place when noConflict(true) is used.

This is a pretty major issue.

comment:4 Changed 3 years ago by john

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

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.