Opened 12 years ago
Last modified 12 years ago
#9290 confirmed Bug
Loading CKEditor in readOnly mode breaks the undo/redo toolbar buttons
Reported by: | Joel | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Toolbar | Version: | 3.6 |
Keywords: | Cc: | joel.peltonen@… |
Description
Loading a CKEditor instance with the config setting
readOnly = true
breaks the undo/redo user interface buttons. Ctrl-z and ctrl-y still work, but the undo and redo UI buttons never get activated, they remain grayed out.
Steps to reproduce: Load CKE with readOnly = true, set readonly to false and type. See This JSfiddle for an example. In the example, wait for the editor to be set editable, write something and the undo button never gets enabled but ctrl-z works. The undo buttons flash enabled every time the editor is set to readOnly false, but after focusing on the editor input they get grayed.
Tested in IE9 and Chrome13 on Win 7 64bit.
Attachments (1)
Change History (4)
comment:1 Changed 12 years ago by
Keywords: | undo readOnly UI removed |
---|---|
Status: | new → confirmed |
Version: | 3.6.4 → 3.6 |
Changed 12 years ago by
Attachment: | readonly2.html added |
---|
comment:2 Changed 12 years ago by
This bug seems to affect C-Z functionality as well so that CTRL-Z doesn't work without switching to source and then back in some cases. For when example when I have two tables directly below each other and I delete the one below, C-Z does not work. This is an issue especially if the source view is not available to the users; is there a workaround other than switching to source?
Currently I load the editor enabled and disable on instanceReady, which fixes the issue quite well.
comment:3 Changed 12 years ago by
Further still, the readOnly also affects cut. If you add the cut icon to my jsfiddle - the cut icon never activates. Also, in my production site the cut gets enabled when the editor is in readOnly state!
In my case (IE9) the cut bug shows up like this: 1) start in readOnly 2) setData to something 3) set readOnly false 4) select a piece of text, like a word 5) set readOnly true 6) setData to something 7) select a piece of text, like a word --> Cut icon is still enabled and also functional.
Problem has been reproducible in all browsers from CKEditor 3.6.
NOTE: Initial readOnly breaks undo/redo. It gets fixed once you switch to source and back.