Opened 7 years ago

Last modified 7 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

  1. Load CKEditor via Requirejs (success)
  2. Replace TextArea by ID (success)
  3. Type around, add text, etc. (success)
  4. 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.

Attachments (1)

jquery-error-screenshot.pdf (149.8 KB) - added by Steven Larsen 7 years ago.
Screenshots

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by Steven Larsen

Attachment: jquery-error-screenshot.pdf added

Screenshots

comment:1 Changed 7 years ago by Marek Lewandowski

Sounds like a DUP of #16809, to be verified.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy