Skip to main content

Search and Top Navigation

#10199 closed bug (fixed)

Opened July 14, 2014 04:59PM UTC

Closed July 15, 2014 01:30PM UTC

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

Reported by: ixtli Owned by: scottgonzalez
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.

Attachments (0)
Change History (4)

Changed July 14, 2014 05:09PM UTC by scottgonzalez comment:1

resolution: → notabug
status: newclosed

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

Changed July 14, 2014 05:17PM UTC by scottgonzalez comment:2

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.

Changed July 14, 2014 05:39PM UTC by scottgonzalez comment:3

owner: → scott.gonzalez
status: reopenedassigned

Changed July 15, 2014 01:30PM UTC by Scott González comment:4

resolution: → fixed
status: assignedclosed

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

Fixes #10199

Closes gh-1282

Changeset: 2447cabd598ed4b58587fa5054a0c9f7b9bd9bd6