Opened 3 years ago

Closed 3 years ago

#10199 closed bug (fixed)

jQuery-Color breaks AMD loading in the presence of custom jQuery build

Reported by: ixtli Owned by: Scott González
Priority: blocker Milestone: 1.11.1
Component: [meta] ui.build Version: 1.11.0
Keywords: Cc:
Blocked by: Blocking:

Description

tl;dr: jQuery-color does not conform to the wrapping style of the other modules and executes its factory function assuming the global object jQuery exists. The offending line is here: https://github.com/jquery/jquery-color/blob/master/jquery.color.js#L663 . It expects a global called jQuery, but your AMD module is written function( $ ) { .. }.

I made a (quite verbose) issue on the project itself: https://github.com/jquery/jquery-color/issues/70 but I think, given official support for AMD loaders, there should be tests to catch this.

Change History (4)

comment:1 Changed 3 years ago by Scott González

Resolution: notabug
Status: newclosed

Everything assumes jQuery exists. A reliance on $ would be a bug.

comment:2 Changed 3 years ago by Scott González

Milestone: none1.11.1
Priority: minorblocker
Resolution: notabug
Status: closedreopened

The problem is that we inline jQuery Color, which expects jQuery to exist. That assumption is correct, but since we're inlining instead of keeping it separate, we need to create a local jQuery to make it work.

comment:3 Changed 3 years ago by Scott González

Owner: set to scott.gonzalez
Status: reopenedassigned

comment:4 Changed 3 years ago by Scott González

Resolution: fixed
Status: assignedclosed

Effect: Create a local jQuery variable to make jQuery Color work

Fixes #10199 Closes gh-1282

Changeset: 2447cabd598ed4b58587fa5054a0c9f7b9bd9bd6

Note: See TracTickets for help on using tickets.