ckeditor4
ckeditor4 copied to clipboard
"DOMException: Failed to execute add on DOMTokenList" when removing numbered list with multiple classes in markup
Type of report
Bug
Provide detailed reproduction steps (if any)
Exception is thrown when removing numbered list and there are multiple classes on li element.
- See https://codepen.io/anon/pen/MPjYzd. Markup and JS reproduced here for convenience
<script src="https://cdn.ckeditor.com/4.11.1/basic/ckeditor.js"></script>
<textarea id="editor">
</textarea>
<script>
var editor = CKEDITOR.replace('editor', {
extraAllowedContent: "div ul li(*)"
});
editor.on('instanceReady', function () {
editor.setData(
`<ul>
<li class="first list">
<div>More
</div>
</li>
</ul>`);
});
</script>
- Select all contents in editable (CTRL+A).
- Select numbered list button. List changes to numbered list.
- Select numbered list button again.
Expected result
Numbered list removed
Actual result
Exception thrown
Other details
- Browser: Any browser. Chrome throws DOMException, Edge reports InvalidCharacterError.
- OS: Windows
- CKEditor version: 4.11.1
- Installed CKEditor plugins: basic (https://cdn.ckeditor.com/4.11.1/basic/ckeditor.js)