Opened 8 years ago
Last modified 8 years ago
#16973 new Bug
Uncaught TypeError: Cannot read property '$' of undefined
Reported by: | Steven Larsen | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.7.0 |
Keywords: | Cc: |
Description
Steps to reproduce
- Load CKEditor via Requirejs (success)
- Replace TextArea by ID (success)
- Type around, add text, etc. (success)
- 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:
- Added to require.config the dependency of jquery to CKEditor (though jquery is loaded already anyway).
- 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.
Screenshots