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

Closed
jswiderski opened this issue Sep 25, 2018 · 2 comments
Closed
Labels
plugin:list The plugin which probably causes the issue. resolution:duplicate A duplicate of an already reported issue. status:confirmed An issue confirmed by the development team. support An issue reported by a commercially licensed client. type:bug A bug.

Comments

@jswiderski
Copy link
Contributor

Type of report

Bug

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="https://powerusers.microsoft.com/plugins/common/feature/oauth2sso/sso_login_redirect?referer=https%3A%2F%2Fpowerusers.microsoft.com%2Ft5%2FPowerApps-Community%2Fct-p%2FPowerApps1">Register</a></li><li><br></li><li>·</li><li><br></li><li><a href="https://powerusers.microsoft.com/plugins/common/feature/oauth2sso/sso_login_redirect?referer=https%3A%2F%2Fpowerusers.microsoft.com%2Ft5%2FPowerApps-Community%2Fct-p%2FPowerApps1">Sign In</a></li><li><br></li><li>·</li><li><br></li><li><a href="https://powerusers.microsoft.com/t5/help/faqpage">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
@jswiderski jswiderski added type:bug A bug. status:confirmed An issue confirmed by the development team. support An issue reported by a commercially licensed client. plugin:list The plugin which probably causes the issue. labels Sep 25, 2018
@mlewand
Copy link
Contributor

mlewand commented Sep 25, 2018

Looks clearly like a duplicate of #2411 to me.

@msamsel
Copy link
Contributor

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.

@msamsel msamsel closed this as completed Sep 26, 2018
@msamsel msamsel added the resolution:duplicate A duplicate of an already reported issue. label Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:list The plugin which probably causes the issue. resolution:duplicate A duplicate of an already reported issue. status:confirmed An issue confirmed by the development team. support An issue reported by a commercially licensed client. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

3 participants