Ticket #4999 (closed Bug: fixed)

Opened 5 years ago

Last modified 5 years ago

Undo unavailable after inserting template before editing content

Reported by: damo Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.2
Component: Core : Undo & Redo Version: SVN (CKEditor) - OLD
Keywords: Confirmed IBM Review- Cc: JoeK

Description

  1. Open editor (do not edit content)
  2. Use template button to insert any template with "Replace content" option active.

Result: Undo is not available

Attachments

4999.patch (630 bytes) - added by garry.yao 5 years ago.
4999_2.patch (1.4 KB) - added by garry.yao 5 years ago.

Change History

Changed 5 years ago by garry.yao

comment:1 Changed 5 years ago by garry.yao

  • Owner set to garry.yao
  • Keywords Review? added
  • Status changed from new to assigned

Adding snapshots for inserting templates with replace mode.

comment:2 follow-up: ↓ 3 Changed 5 years ago by alfonsoml

  • Keywords Review- added; Review? removed

Wouldn't it be better to add the save snapshots inside the setData?

Any plugin or external code that modifies the content will have to be aware of this behavior, I don't think that it's straightforward that people is required to save a snapshot themselves when they are calling an API to alter the content of the editor.

comment:3 in reply to: ↑ 2 Changed 5 years ago by garry.yao

  • Keywords Review? added; Review- removed

Replying to alfonsoml: Definitely, nice prompt.

Changed 5 years ago by garry.yao

comment:4 Changed 5 years ago by alfonsoml

  • Keywords Review+ added; Review? removed

comment:5 Changed 5 years ago by garry.yao

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Version set to SVN (CKEditor)
  • Component changed from General to Core : Undo/Redo
  • Keywords Confirmed added

Fixed with [5015].

comment:6 Changed 5 years ago by fredck

  • Status changed from closed to reopened
  • Resolution fixed deleted

I've just reverted [5015]. It's causing several issues with the undo system (e.g. #5191 and #5208).

comment:7 Changed 5 years ago by fredck

  • Keywords Review- added; Review+ removed

Btw, reverted with [5163].

comment:8 Changed 5 years ago by fredck

  • Status changed from reopened to closed
  • Resolution set to fixed

I understand that having the undo snapshot for setData is needed, but it looks like there is much more work to have it working properly. I've opened #5217 for it, while still fixing this ticket with the first patch provided by Garry, with [5166].

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