Opened 17 years ago

Last modified 9 years ago

#1511 confirmed New Feature

Undo manager does not record object resizing

Reported by: Ron Owned by:
Priority: Normal Milestone:
Component: Core : Undo & Redo Version: 3.0
Keywords: Cc: joel.peltonen@…

Description (last modified by Piotrek Koszuliński)

Undo works like a charm, but when resizing an image this cannot be undone with the undo system. It would be great if this would be incorporated.


See http://dev.ckeditor.com/ticket/1511#comment:20 for reasons why this issue has not been fixed.

Attachments (1)

1511.patch (1.9 KB) - added by David Chandler 11 years ago.
Patch to allow undo of resize in Internet Explorer

Download all attachments as: .zip

Change History (23)

comment:1 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Keywords: image resizing removed
Milestone: FCKeditor 2.5

comment:2 Changed 17 years ago by Wojciech Olchawa

Keywords: Confirmed added

comment:3 Changed 15 years ago by Artur Formella

Milestone: CKEditor 3.x

Similar bug in V3- In most cases resizing can be undone but undo snapshot isn't made.

comment:4 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

comment:5 Changed 12 years ago by Jakub Ś

Version: FCKeditor 2.5 Beta3.0
<p>
	Type, paste something or start formatting this sample text to see plugin in action.
	<img alt="" src="http://upload.wikimedia.org/wikipedia/commons/1/17/Ferrari_F430_front_20080605.jpg" style="width: 225px; height: 160px;" /></p>

This is still an issue in latest CKEditor 4.1. Problem can be reproduced in both CKE 3.x and 4.x (v4) in IE and Firefox and concerns resizing with native browser handles (Please also note that in CKEditor resizing image with CKEditor dialog is registered by undo manager).

From CKEditor 3.0 through 3.6.6 till 4.0 beta you needed to “trigger” undo manager to get this working. If you had used below initial code you had to first e.g. type letter then resize image so that undo manager could catch it. Another option to trigger undo manager was pasting below code in source mode, switching to WYSIWYG and then resizing image

<p>
	Type, paste something or start formatting this sample text to see plugin in action.
	<img alt="" src="http://upload.wikimedia.org/wikipedia/commons/1/17/Ferrari_F430_front_20080605.jpg" style="width: 225px; height: 160px;" /></p>

In CKEditor 4.0 behaviour has changed as resizing image with native handles isn’t caught at all or almost at all. You can still trigger undo manager in the same way as for CKE 3.0 – 4 beta but now image resize won’t be reverted separately. Let’s say you have loaded initial code, typed letter and then resized image. From CKEditor 4.0 pressing undo will revert both typed letter and resized image.

Last edited 11 years ago by Jakub Ś (previous) (diff)

comment:6 Changed 12 years ago by Alfonso Martínez de Lizarrondo

I've tested my onchange plugin with Firefox and it's able to detect such native changes, so I guess that when you release the new onchange plugin this feature will be incorporated by default.

comment:7 Changed 12 years ago by Jakub Ś

Thanks for comment @alfonsoml. It seems that i haven't checked this properly the first time. New modified comment:5 explains better what is happening.

Changed 11 years ago by David Chandler

Attachment: 1511.patch added

Patch to allow undo of resize in Internet Explorer

comment:8 Changed 11 years ago by David Chandler

Keywords: HasPatch added

Added a patch for CKEditor 4.3.3 to allow undo of resizing in Internet Explorer.

comment:9 Changed 11 years ago by Jakub Ś

To get your proposed fix tested and applied (if it is correct) please get CKEditor 4 code from https://github.com/ckeditor/ckeditor-dev, prepare your fix and make a "pull request".
In comment please specify link to bug for which this fix was prepared.
Here is the example list of pull requests https://github.com/ckeditor/ckeditor-dev/pulls?direction=desc&page=1&sort=created&state=open.

This is much faster way to get proposed fix implemented/rejected (if they are invalid). At least in V4.

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

Milestone: CKEditor 4.4.1
Summary: Undo image resizing[PR#88] Undo manager does not record object resizing

Scheduled for review in 4.4.1. Pull request: https://github.com/ckeditor/ckeditor-dev/pull/88

comment:11 Changed 11 years ago by Marek Lewandowski

Owner: set to Marek Lewandowski
Status: confirmedassigned

comment:12 Changed 11 years ago by Piotrek Koszuliński

I guess that it won't be possible to write reasonable tests for this, so, after creating a ticket branch, do a manual testing and merge it to master if it passes.

comment:13 Changed 11 years ago by Joel

Cc: joel.peltonen@… added

Add CC

comment:14 Changed 11 years ago by Marek Lewandowski

Status: assignedpending

PR#88 needs some tweaks mentioned in its GitHub discussion.

comment:15 Changed 11 years ago by Marek Lewandowski

Status: pendingconfirmed

comment:16 Changed 11 years ago by Marek Lewandowski

Status: confirmedassigned

comment:17 Changed 11 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.4.1CKEditor 4.4.2
Owner: Marek Lewandowski deleted
Status: assignedconfirmed

During review I encountered IE9+ bug which makes the approach used in pull request invalid (would work only on IE8-10 so it would be a temporary fix). I also found another ticket that is very related to this one - #9317. More details: https://github.com/ckeditor/ckeditor-dev/pull/88#issuecomment-42294681

We'll work on both of them in CKEditor 4.4.2. They need a similar code, so we can merge both patches. The patch should be based on miken's workaround from https://dev.ckeditor.com/ticket/9317#comment:4

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

Milestone: CKEditor 4.4.2CKEditor 4.4.3

Did not make it to the 4.4.2. Related to #11739 that needed to be postponed too (http://dev.ckeditor.com/ticket/11739#comment:17).

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

Milestone: CKEditor 4.4.3CKEditor 4.4.4

The 4.4.3 milestone was shortened, so couple of tickets must be postponed.

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

Keywords: HasPatch removed
Milestone: CKEditor 4.4.4
Summary: [PR#88] Undo manager does not record object resizingUndo manager does not record object resizing

While working on #9317 we found that there's no possibility to intercept resizing on IE11 and it's very likely that it won't be possible in next IE versions. However, we managed to convince Microsoft that there must be a way to disable native object resize handles (https://connect.microsoft.com/IE/feedback/details/907422/ie11-unable-to-disable-resize-helper-for-images-inputs-etc-inside-contenteditable). So we are able to handle only old IE versions and not without complications.

A for Firefox, we thought that using the input event we'll be able to handle resizing (there are no special events), but again... no. Input event does not carry any information about intention, so we only know that something changed, but it could be everything and thus we can't automatically record a snapshot, because it might be a keypress (we group keypresses). Of course we could use mutation observers in this case, but that's again a lot of work (mainly testing). Fortunately, config.disableObjectResizing works on FF.

Taking all this into consideration, we are not willing to spend time on this issue. Perhaps it can be fixed on all browsers, but cost exceeds profit at the moment. We really hope that Microsoft will implement the 'enableObjectResizing' command (or some alternative) and we'll be able to hide these problematic handles on all browsers.

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

Description: modified (diff)

comment:22 Changed 9 years ago by Jakub Ś

#14592 was marked as duplicate.

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