Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

All content is properly removed after undoing paste in some scenarios #1683

Merged
merged 3 commits into from
Feb 19, 2019

Conversation

scofalik
Copy link
Contributor

Suggested merge commit message (convention)

Fix: All content is properly removed after undoing paste in some scenarios. Closes ckeditor/ckeditor5#1540.

// If the target is the end of the move range this operation doesn't really move anything.
// In this case, it is better for OT to use range start instead of range end.
targetPosition.isEqual( range.end ) ? range.start : targetPosition,
targetPosition,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that maybe at some point it was important to change the target position, but then we might have added some cases and this got fixed in a different place. It didn't cause any test to fail and in this scenario, it looked like an obvious error (to use range.start instead of targetPosition).

@scofalik
Copy link
Contributor Author

scofalik commented Feb 18, 2019

It seems that somewhere along the way (not with this fix) we also fixed "by accident" two of tests that were skipped 🎉. I unskipped them and added them to this PR.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.008%) to 99.984% when pulling 86473f8 on t/ckeditor5/1540 into 6577d04 on master.

@Reinmar Reinmar merged commit 08855d3 into master Feb 19, 2019
@Reinmar Reinmar deleted the t/ckeditor5/1540 branch February 19, 2019 11:10
@scofalik
Copy link
Contributor Author

Ugh, you already merged it but there is a coverage drop (one branch) after the changes I've introduced. I will fix it straight on master then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants