We are migrating CKEditor issue tracking to GitHub. Please, use GitHub to report any new issues.

The former tracking system (this website) will still be available in the read-only mode. All issues reported in the past will still be available publicly and can be referenced.

Important: we decided not to transfer all the tickets to GitHub, as many of them are not reproducible anymore or simply no longer requested by the community. If the issue you are interested in, can be still reproduced in the latest version of CKEditor, feel free to report it again on GitHub. At the same time please note that issues reported on this website are still taken into consideration when picking up candidates for next milestones.

The problem is that after #10103updateCommands() is executed after undoManager.onChange() and overwrites whatever the first one has set. The order matters.

Setting ​startDisabled property in command definitions doesn't solve the problem because in some cases undo/redo should be enabled when switching source->wysiwyg. I.e, if there was some undo image available before going wysiwyg->source. startDisabled violates this case and makes undo/redo unavailable regardless of real state.

There's a basic solution for this issue that executes existing ​procedure on both mode (to solve wysiwyg<->source issue) and instanceReady (to solve initial state issue) with lower priority so undoManager.onChange() always has the final word.

With another concept of fixing command state issue. In ​t/10249b, updateCommands() discovers that execution is performed on instanceReady and updates the new commands only. The new ones are those that came after first mode event but before instanceReady for some reason.

The main advantage of this solution is that it reverts mode listener:

this.on( 'mode', updateCommands );

to the pre - ​git:a91dfb05f4de6a era, outside of instanceReady callback. It also avoids double command state initialization thanks to command names cache. If accepted we can eventually rewrite this solution to have something like updateCommands( event, updateNewOnly ).