﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
16973	Uncaught TypeError: Cannot read property '$' of undefined	Steven Larsen		"== Steps to reproduce ==

1. Load CKEditor via Requirejs (success)
2. Replace TextArea by ID (success)
3. Type around, add text, etc. (success)
3. Add heading 1 via the format toolbar, then click ""Source"". Console throws error ""Uncaught TypeError: Cannot read property '$' of undefined"".

JQuery IS defined and loaded (via requirejs and used throughout the site and well before CKEditor is loaded).

Drilldown on the error is on this compacted line:
...this.hasFocus&&(this.hasFocus=!1,CKEDITOR.env.chrome&&a.editable().isInline()&&a.window.$.getSelection().removeAllRanges(),...

The error is on a.window.$ which apparently a.window is undefined.

Have tried various things to no-avail:
1. Added to require.config the dependency of jquery to CKEditor (though jquery is loaded already anyway).
2. Added jquery as a dependency to the call to require for CKEditor (e.g. require(['jquery', 'ckeditor/ckeditor'], function(){window.console.log('loaded...');}); Didn't change the error.

Not sure what else to do.

== Other details (browser, OS, CKEditor version, installed plugins) ==
Windows 7 (latest version of Chrome). Running on website that is localhost with PHP, Backbone, jQuery, and underscore all loaded. Full install of CKEditor.
"	Bug	new	Normal		General	4.7.0			
