Opened 8 years ago

Last modified 8 years ago

#14558 confirmed Bug

Widgets gets deleted when editor is readonly

Reported by: Duskfall Owned by:
Priority: Normal Milestone:
Component: Core : Selection Version: 4.3
Keywords: Cc:

Description

Steps to reproduce

  1. Make editor readOnly in config
  2. Use a widget like placeholder
  3. Try to delete placeholder

Expected result

Do nothing

Actual result

Widget gets deleted in read only editor

Tested in 4.5.7 and 4.5.8

Change History (2)

comment:1 Changed 8 years ago by Jakub Ś

Status: newconfirmed
Version: 4.5.74.3

Problem can be reproduced from CKEditor 4.3 and is a part of a larger ticket #12134.

To reproduce:

  1. Open placeholder sample
  2. Make editor read-only with CKEDITOR.instances.editor1.setReadOnly(true);
  3. Click on editor and press Ctrl+X or Delete
  4. If that doesn't work - unfocus and focus the placeholder; next repeat step 3.

NOTE: In IE error is thrown but this is reported in #11825

Last edited 8 years ago by Jakub Ś (previous) (diff)

comment:2 Changed 8 years ago by Duskfall

Applied a simple fix for me in core. In private function del i added if(editor.readOnly) return false; Added also a unit test. Will commit in a bit

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