Opened 8 years ago

Closed 8 years ago

#14768 closed Bug (duplicate)

Widget Error when CKEditor was not focused before: Cannot read property 'checkReadOnly' of undefined

Reported by: cwalter Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc: c.walter-95@…

Description

Steps to reproduce

  1. Download and implement simplebox plugin from the tutorial. This may happen to other plugins, too.

https://github.com/ckeditor/ckeditor-docs-samples/tree/master/tutorial-simplebox-2/simplebox

  1. Load content into the editor. The content should be the same like it is produced by the plugin. So it is similar to saving and loading the data for CKEditor.
    CKEDITOR.replace('editor1', {
        extraPlugins: 'simplebox'
    });
    CKEDITOR.instances.editor1.setData('<div class="simplebox align-left"><h2 class="simplebox-title">Title</h2><div class="simplebox-content"><p>Content...</p></div></div>', {
        callback: function() {
            this.checkDirty(); // true
        }
    });
    
  1. Load the Page with a web browser (I use chrome). You will see the simplebox plugin field.
  2. Now click the simplebox plugin icon. When clicking ok after inserting the required fields, the error will show up in your console and no new simplebox field is shown in your editor.

Attention: This will only happen if you do not click into the editor after the page load. Please click the simplebox plugin icon before you do anything else with the editor.

Expected result

The plugin dialog closes and a new simplebox is shown in the editor.

Actual result

No changes within the plugin dialog are saved and the following error is shown in the browser console: "ckeditor.js:344 Uncaught TypeError: Cannot read property 'checkReadOnly' of undefined".

Other details (browser, OS, CKEditor version, installed plugins)

CKEditor v4.5.10, Chrome Version 51.0.2704.103, Simplebox Plugin

Change History (1)

comment:1 Changed 8 years ago by Jakub Ś

Resolution: duplicate
Status: newclosed
Version: 4.5.10 (GitHub - master)

DUP of #13620.

TC describes having widget as first element and the widget plugin actually uses insertElement method - https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/widget/plugin.js#L420.

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