-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Editor crashes after merging paragraph to blockquote in table cell #1265
Comments
Taking this as already on it: https://github.com/cksource/cloud-features/issues/2205. @pomek found out that this case does not happen without table and it isn't associated with table post fixers. |
Fix for the issue: https://github.com/ckeditor/ckeditor5-engine/blob/99def977bebea4ae342df535cd133d8f63df5825/src/model/utils/deletecontent.js#L142-L148 Here we should check whether if ( endParent == startPos.parent ) {
return;
}
if ( !endPos.isEqual( startPos ) ) {
// In this case, before we merge, we need to move `endParent` to the `startPos`:
// <a><b>x[]</b></a><c><d>{}y</d></c>
// becomes:
// <a><b>x</b>[]<d>y</d></a><c>{}</c>
writer.insert( endParent, startPos );
} |
Fix: `model#deleteContent()` will proper merge elements inside limit element. Closes ckeditor/ckeditor5#1265.
Tests: Added an integration test for ckeditor/ckeditor5#1265.
Is this a bug report or feature request? (choose one)
🐞 Bug report
💻 Version of CKEditor
Latest master.
📋 Steps to reproduce
✅ Expected result
The editor doesn't crash.
❎ Actual result
The editor crashes.
📃 Other details that might be useful
Error
GIF

The text was updated successfully, but these errors were encountered: