Opened 10 years ago

Closed 10 years ago

#11077 closed Bug (fixed)

Image2: resize records two undo snapshots

Reported by: Piotrek Koszuliński Owned by: Olek Nowodziński
Priority: Normal Milestone: CKEditor 4.3.1
Component: General Version:
Keywords: Cc:

Description

  1. Open image2 sample.
  2. Resize image using resize handler.
  3. Undo once - nothing happens. Undo second time - image is resized back to its original size.

Change History (4)

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

Owner: set to Olek Nowodziński
Status: newassigned

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

Status: assignedreview

Fix: t/11077

The problem was because saveSnapshot was called too early on mouseup. Since DOM was modified after that (removed class, so no visual change), if any code called saveSnapshot again, an additional, ghost snapshot was recorded.

The fix changes the order of execution.

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

Status: reviewreview_passed

It would be a little bit safer to lock snapshot during resizing, but let's wait for a TC.

comment:4 in reply to:  3 Changed 10 years ago by Olek Nowodziński

Resolution: fixed
Status: review_passedclosed

Replying to Reinmar:

It would be a little bit safer to lock snapshot during resizing, but let's wait for a TC.

Yip!

The fix landed in master git:9c3b8e4.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy