Opened 6 years ago

Closed 5 years ago

#4999 closed Bug (fixed)

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

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

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by garry.yao

comment:1 Changed 6 years ago by garry.yao

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

Adding snapshots for inserting templates with replace mode.

comment:2 follow-up: Changed 6 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

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

Fixed with [5015].

comment:6 Changed 5 years ago by fredck

  • Resolution fixed deleted
  • Status changed from closed to reopened

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

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

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