Opened 9 years ago

Last modified 8 years ago

#13314 confirmed Bug

checkReadOnly is undefined when using readonly inline editors

Reported by: Andrea Owned by:
Priority: Normal Milestone:
Component: Core : Read-only Version: 4.4.0
Keywords: Cc:

Description

How to reproduce:

Working demo to verify: http://jsfiddle.net/aZqL9/7/

1 - Add two DIVs

<div contenteditable="true" id="editable"><img src="http://i.imgur.com/M3LOzdI.jpg"/></div>

<div contenteditable="true" id="editable2"><img src="http://i.imgur.com/aD7V3hQ.jpg" width="320"/></div>

2 - Add a button to set the editors as readonly

<input type="button" onclick="editor.setReadOnly(true); editor2.setReadOnly(true);" value="Make readonly">

3 - Execute the loading of the editors in a <script>

CKEDITOR.disableAutoInline = true;

var editor = CKEDITOR.inline( document.getElementById( 'editable' ) );
var editor2 = CKEDITOR.inline( document.getElementById( 'editable2' ) );

5 - When it loads, click the button to set the editors to read only

6 - Do a right click on the first editor

7 - Do a right click on the 2nd editor. Javascript error is shown

Working demo to verify: http://jsfiddle.net/aZqL9/7/

Reproducible in: IE11

Attachments (3)

ie_error.png (358.2 KB) - added by Andrea 9 years ago.
JS error on IE
readonly7.html (2.1 KB) - added by Jakub Ś 9 years ago.
menu_plugin.patch (494 bytes) - added by Andrea 9 years ago.
The issue seems to be on the menu plugin, I'm attaching a patch with the fix

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by Andrea

Attachment: ie_error.png added

JS error on IE

Changed 9 years ago by Jakub Ś

Attachment: readonly7.html added

comment:1 Changed 9 years ago by Jakub Ś

Keywords: readonly inline ie11 removed
Status: newconfirmed
Version: 4.4.0

Problem can be reproduced in all browsers starting from CKEditor 4.4.

Message: Uncaught TypeError: Cannot read property 'checkReadOnly' of undefined
URI: ckeditor-dev/plugins/clipboard/plugin.js
Line: 388

To reproduce: Load the sample, Make editors read-only, right-click on them.

Changed 9 years ago by Andrea

Attachment: menu_plugin.patch added

The issue seems to be on the menu plugin, I'm attaching a patch with the fix

comment:2 Changed 8 years ago by Marek Lewandowski

@j.swiderski can't repro it with IE11, Chrome - could you confirm it?

comment:3 Changed 8 years ago by Jakub Ś

I have tried latest master, major and problem is still there.

  1. Load attached sample.
  2. Scroll down if needed and press "Make it readonly"
  3. Right-click on second editor.

Result: Error is thrown.

comment:4 Changed 8 years ago by Jakub Ś

Similar issues with 'checkReadOnly' can also be found in: #14809, #13620

comment:5 Changed 8 years ago by kkrzton

This issue is also reproducible with CKEditor 4.5.11 and newest Edge browser (38.14393). Here is updated jsfiddle https://jsfiddle.net/f1ames/zoo0fwk5/4/.

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