ckeditor / ckeditor4

The best enterprise-grade WYSIWYG editor. Fully customizable with countless features and plugins.
https://ckeditor.com/ckeditor-4
Other
5.79k stars 2.47k forks source link

Failed to execute 'appendChild' on 'Node' when deleting <ol> from <ul> #3934

Open Geo-T opened 4 years ago

Geo-T commented 4 years ago

Type of report

Bug

Provide detailed reproduction steps

Create a two level list as follow: image

On the empty sublist item, add an ordered list: image

Delete the last line with two backspace, it will produce the following error in the console:

Uncaught DOMException: Failed to execute 'appendChild' on 'Node': The new child element contains the parent. at CKEDITOR.dom.element.append (https://ckeditor.com/assets/libs/ckeditor4/4.14.0/ckeditor.js:97:300) at l (https://ckeditor.com/assets/libs/ckeditor4/4.14.0/ckeditor.js:1132:15) at a.<anonymous> (https://ckeditor.com/assets/libs/ckeditor4/4.14.0/ckeditor.js:1147:282) at a.c (https://ckeditor.com/assets/libs/ckeditor4/4.14.0/ckeditor.js:10:70) at a.<anonymous> (https://ckeditor.com/assets/libs/ckeditor4/4.14.0/ckeditor.js:11:433) at a.CKEDITOR.editor.CKEDITOR.editor.fire (https://ckeditor.com/assets/libs/ckeditor4/4.14.0/ckeditor.js:13:97) at CKEDITOR.keystrokeHandler.g (https://ckeditor.com/assets/libs/ckeditor4/4.14.0/ckeditor.js:249:395) at $.c (https://ckeditor.com/assets/libs/ckeditor4/4.14.0/ckeditor.js:10:70) at $.fire (https://ckeditor.com/assets/libs/ckeditor4/4.14.0/ckeditor.js:11:433) at HTMLBodyElement.<anonymous> (https://ckeditor.com/assets/libs/ckeditor4/4.14.0/ckeditor.js:68:412)

You can reproduce this bug on the demo page: https://ckeditor.com/ckeditor-4/demo/

Dumluregn commented 4 years ago

Thank you for report. It's reproducible also on CDN and at least as old as 4.7.0 (didn't check former versions).