Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OT improvements for undo in pasting scenarios #4497

Closed
scofalik opened this issue Mar 19, 2019 · 0 comments · Fixed by ckeditor/ckeditor5-engine#1702
Closed

OT improvements for undo in pasting scenarios #4497

scofalik opened this issue Mar 19, 2019 · 0 comments · Fixed by ckeditor/ckeditor5-engine#1702
Assignees

Comments

@scofalik
Copy link
Contributor

I discovered an error concerning undo in a scenario with paste and delete.

This test doesn't pass:

john.setData( '<paragraph>Ab[]cd</paragraph><paragraph>Wxyz</paragraph>' );

john.editor.model.insertContent(
	new DocumentFragment( [
		new Element( 'paragraph', null, new Text( 'Foo' ) ),
		new Element( 'paragraph', null, new Text( 'Bar' ) )
	] )
);

john.setSelection( [ 1, 3 ], [ 2, 2 ] );

john._processExecute( 'delete' );

expectClients( '<paragraph>AbFoo</paragraph><paragraph>Baryz</paragraph>' );

john.undo();

expectClients( '<paragraph>AbFoo</paragraph><paragraph>Barcd</paragraph><paragraph>Wxyz</paragraph>' );

john.undo();

expectClients( '<paragraph>Abcd</paragraph><paragraph>Wxyz</paragraph>' );

There are two problems, with split x split transformation and merge x split transformation. These are some edge cases that weren't yet covered in OT.

@scofalik scofalik self-assigned this Mar 19, 2019
pjasiun referenced this issue in ckeditor/ckeditor5-engine Mar 21, 2019
Fix: Editor crashed during undo in some pasting+remove scenarios. Closes #1701.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants