Opened 5 years ago

Closed 5 years ago

#11677 closed Bug (fixed)

CTRL+Z/Y (undo/redo) blocked in source mode

Reported by: Piotrek Koszuliński Owned by: Piotrek Koszuliński
Priority: Normal Milestone: CKEditor 4.3.5
Component: General Version: 4.3.2
Keywords: Cc:

Description

Unfortunately fix for #11126 touched also source mode, so undoing and redoing is completely impossible.

We need to find a way to block those keystrokes only in wysiwyg mode. I'm not sure how can we achieve this in a clean way, because blockedKeystroke is mode-blind and undo/redo commands are not even executed at the bottom/top of the stack, because they are disabled then.

Our API does not leave us much choice (if any), so new option may need to be proposed.

Change History (11)

comment:1 Changed 5 years ago by Piotrek Koszuliński

Status: newconfirmed

comment:2 Changed 5 years ago by Olek Nowodziński

I don't think it's critical. It's been two months since the release of 4.3.2 and no one (?) submitted a bug. Either very few users care about undo support in Source Mode (Source Mode in general?) or this behavior is considered a feature of editor, implemented by purpose.

comment:3 Changed 5 years ago by Piotrek Koszuliński

I would rather say that it's one of these bugs which you can workaround very easily, so you quickly forget and don't want to waste time on reporting. But it's still a regression and I noticed that something is wrong few weeks ago. I just didn't think that it's a CKEditor's issue, because browsers have problems with undo/redo too.

comment:4 Changed 5 years ago by Frederico Caldeira Knabben

This is certainly bad. Undo is the kind of feature that a user MUST trust. It's like "ok, I'll try this out and if it'll not work I'm fine because I can undo". It's one of the most basic UX requirements, especially for an editor.

comment:5 Changed 5 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.4.1

Solution:

  1. Revert patch for #11126.
  2. In undo plugin, add an editor#key listener which will prevent default action when in wysiwyg mode.

comment:6 Changed 5 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.4.1CKEditor 4.3.5

comment:7 Changed 5 years ago by Piotrek Koszuliński

Owner: set to Piotrek Koszuliński
Status: confirmedassigned

comment:8 Changed 5 years ago by Piotrek Koszuliński

Status: assignedreview

Pushed branch:t/11677 on dev and tests. The solution could not be simpler, because cancelling editor#key prevents also from executing commands. This change in the key event would make it more powerful: http://dev.ckeditor.com/ticket/4264#comment:5.

Additionally, I found out that the this is not any more needed: https://github.com/ckeditor/ckeditor-dev/blob/32de5b622320da89c01f9ecd989923011beaa2ac/core/keystrokehandler.js#L90 I'll create a ticket because I saw that hack in many places.

comment:9 Changed 5 years ago by Piotrek Koszuliński

Reported: #11739.

comment:10 Changed 5 years ago by Olek Nowodziński

Status: reviewreview_passed

comment:11 Changed 5 years ago by Piotrek Koszuliński

Resolution: fixed
Status: review_passedclosed

Fixed on master with git:954f689 on dev and 40abd29 on tests.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy