Opened 8 years ago

Closed 8 years ago

#4999 closed Bug (fixed)

Undo unavailable after inserting template before editing content

Reported by: Damian Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.2
Component: Core : Undo & Redo Version: SVN (CKEditor) - OLD
Keywords: Confirmed IBM Review- Cc: Joe Kavanagh

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 (2)

4999.patch (630 bytes) - added by Garry Yao 8 years ago.
4999_2.patch (1.4 KB) - added by Garry Yao 8 years ago.

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by Garry Yao

Attachment: 4999.patch added

comment:1 Changed 8 years ago by Garry Yao

Keywords: Review? added
Owner: set to Garry Yao
Status: newassigned

Adding snapshots for inserting templates with replace mode.

comment:2 Changed 8 years ago by Alfonso Martínez de Lizarrondo

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 8 years ago by Garry Yao

Keywords: Review? added; Review- removed

Replying to alfonsoml: Definitely, nice prompt.

Changed 8 years ago by Garry Yao

Attachment: 4999_2.patch added

comment:4 Changed 8 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review+ added; Review? removed

comment:5 Changed 8 years ago by Garry Yao

Component: GeneralCore : Undo/Redo
Keywords: Confirmed added
Resolution: fixed
Status: assignedclosed
Version: SVN (CKEditor)

Fixed with [5015].

comment:6 Changed 8 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: closedreopened

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

comment:7 Changed 8 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review+ removed

Btw, reverted with [5163].

comment:8 Changed 8 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: reopenedclosed

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 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy