Opened 11 years ago
Closed 11 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 11 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
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 11 years ago by
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 11 years ago by
Milestone: | → CKEditor 4.4.1 |
---|
Solution:
- Revert patch for #11126.
- In undo plugin, add an editor#key listener which will prevent default action when in wysiwyg mode.
comment:6 Changed 11 years ago by
Milestone: | CKEditor 4.4.1 → CKEditor 4.3.5 |
---|
comment:7 Changed 11 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | confirmed → assigned |
comment:8 Changed 11 years ago by
Status: | assigned → review |
---|
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:10 Changed 11 years ago by
Status: | review → review_passed |
---|
comment:11 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed on master with git:954f689 on dev and 40abd29 on tests.
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.