ckeditor4 icon indicating copy to clipboard operation
ckeditor4 copied to clipboard

"DOMException: Failed to execute add on DOMTokenList" when removing numbered list with multiple classes in markup

Open tahoon-ms opened this issue 7 years ago • 0 comments

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.

  1. 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>
  1. Select all contents in editable (CTRL+A).
  2. Select numbered list button. List changes to numbered list.
  3. 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)

tahoon-ms avatar Dec 28 '18 20:12 tahoon-ms