Opened 6 years ago

Closed 6 years ago

#8299 closed Bug (fixed)

Undo not working properly

Reported by: Satya Minnekanti Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.6.2
Component: General Version: 3.6.2
Keywords: IBM Cc: Damian, Teresa Monahan

Description

Scenario 1:

  1. Open Ajax sample and type the following sentence ( This is test sentence.) and click on Insert Horizontal line icon.
  1. See that Horizontal line is inserted after current paragraph.
  1. Now click on Undo icon once.

Expected Result: Horizontal line inserted in step 2 should be removed & cursor should stay at end of paragraph typed in step 1.

Actual Result: It removes Horizontal line as well as most of text in the paragraph we typed in step 1 and also it disables the Undo button

Scenario 2:

  1. Open Ajax sample and type the following sentence ( This is test sentence.) select the sentence and apply a Paragraph Format option( for ex: Heading 1).
  1. See that Heading 1 paragraph format applied to selected paragraph.
  1. Now click on Undo icon once.

Expected Result: Heading 1 paragraph format applied to selected paragraph is removed.

Actual Result: It removed the whole paragraph along with Heading 1 paragraph format.

This has been happening from rev 7225

Attachments (3)

8299.patch (1.4 KB) - added by Garry Yao 6 years ago.
8299_2.patch (1.1 KB) - added by Garry Yao 6 years ago.
8229_3.patch (1.8 KB) - added by Garry Yao 6 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 6 years ago by Jakub Ś

Status: newconfirmed
Version: 3.6.2 (SVN - trunk)

Reproducible from rev [7225]

comment:2 Changed 6 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.6.2

Changed 6 years ago by Garry Yao

Attachment: 8299.patch added

comment:3 Changed 6 years ago by Garry Yao

Keywords: NeedTest added
Owner: set to Garry Yao
Status: confirmedreview

comment:4 Changed 6 years ago by Garry Yao

Keywords: NeedTest removed

comment:5 Changed 6 years ago by Frederico Caldeira Knabben

Status: reviewreview_passed

comment:6 Changed 6 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Fixed with [7252].

comment:7 Changed 6 years ago by Satya Minnekanti

This is still notproperly fixed. Please reopen the ticket. Below scenarios do not work.

Open Ajax sample and paste the following code in source.

<p>
	first paragraph</p>
<ol>
	<li>
		list one</li>
	<li>
		list two.</li>
</ol>
<p>
	second paragraph</p>

Go to rich text, select entire text by using Ctrl + A or select the list and one or both the paragraphs & click on Delete or Backspace button.

see that the selected content is removed.

Now click on Undo icon or press Ctrl + z

Expected Result: Deleted text comes back

Actual Result: Deleted text will never come back no matter how many times we press Undo

comment:8 Changed 6 years ago by Satya Minnekanti

Scenario 2 Open any CK Editor sample and paste the following code in source.

<p>
	111111111111111111111 5555555555555555555 7777777777777777777777777777777777</p>
<p>
	000000000000000000000000000000 33333333333333333333333333333333 22222222222222222222222222222222222222 8888888888888888888888888888888888888</p>

Go to rich text, select entire text by using Ctrl + A & click Delete or Backspace button.

see that the selected content is removed.

Now click on Undo icon or press Ctrl + z

Expected Result: Deleted text comes back

Actual Result: Deleted text will never come back no matter how many times we press Undo

comment:9 Changed 6 years ago by Wiktor Walc

Resolution: fixed
Status: closedreopened

comment:10 Changed 6 years ago by Jakub Ś

Status: reopenedconfirmed

Still reproducible from rev [7225]

Changed 6 years ago by Garry Yao

Attachment: 8299_2.patch added

comment:11 in reply to:  4 Changed 6 years ago by Garry Yao

Status: confirmedreview

Replying to garry.yao:

http://ckeditor.t/tt/8299/1.html

TC is enlarged to include tc provided at above comment.

Changed 6 years ago by Garry Yao

Attachment: 8229_3.patch added

comment:12 Changed 6 years ago by Garry Yao

I realized the timeout change in [7225] was a bad move, as the closure will read an outdated selection state which will cause some chaos in cursor position, eventually cause #8337.

comment:13 Changed 6 years ago by Frederico Caldeira Knabben

Status: reviewreview_passed

comment:14 Changed 6 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Re-fixed with [7255].

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