Skip to content
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

Pasting empty list and converting it to different list type throws error #2438

jswiderski opened this Issue Sep 25, 2018 · 2 comments


None yet
3 participants
Copy link

jswiderski commented Sep 25, 2018

Type of report


Provide detailed reproduction steps (if any)

  1. Paste the below code in Source mode of full preset sample.
<p><br></p><ul></ul><ul><li><a href="">Register</a></li><li><br></li><li>·</li><li><br></li><li><a href="">Sign In</a></li><li><br></li><li>·</li><li><br></li><li><a href="">Help</a></li></ul><p><br></p>

NOTE: Starting from CKEditor 4.8 it is enough to paste just the empty list <ul></ul> to get the error.

  1. Switch to wysiwyg and click inside the editor to focus is
  2. Press Ctrl+A to select all content
  3. Click on numbered or bulleted list button

Expected result

Hard to say because Empty lists is not something standard:

  1. Empty li element gets created in empty list and it gets converted to different list type in necessary.
  2. Empty list gets removed
  3. Nothing or ul gets converted to empty ol if numbered list was pressed

Actual result

JavaScript error gets thrown:
Message: Cannot read property 'listNode' of null
URI: /ckeditor-dev/plugins/list/plugin.js
Line: 334

Other details

  • Browser: Any
  • OS: Any
  • CKEditor version: 4.0+
  • Installed CKEditor plugins: List

This comment has been minimized.

Copy link

mlewand commented Sep 25, 2018

Looks clearly like a duplicate of #2411 to me.


This comment has been minimized.

Copy link

msamsel commented Sep 26, 2018

I have some prototype of solution for the #2411 and it's fix throwing error in this case too. We could merge those 2 issues together and move any further discussion to that issue.

Approach which I used is just preventing of throwing error. This empty ul will remain in markup as user want to paste it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.