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

Enter key deletes list item with content #1819

Closed
sebeu opened this issue Mar 19, 2018 · 2 comments
Closed

Enter key deletes list item with content #1819

sebeu opened this issue Mar 19, 2018 · 2 comments
Labels
plugin:list The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.

Comments

@sebeu
Copy link

sebeu commented Mar 19, 2018

Are you reporting a feature request or a bug?

Bug

Provide detailed reproduction steps (if any)

  1. Enter https://nightly.ckeditor.com/basic/samples/
  2. Set data with developer tools
CKEDITOR.instances.editor.setData('<ul><li>Some text<br/><p></p></li></ul>')
  1. Place cursor manually inside second line of list item
<ul><li>Some text<br/><p>^</p></li></ul>
  1. Press Enter

Expected result

A new list item is created and cursor is placed inside new list item

<ul><li>Some text<br/><p></p></li><li>^</li></ul>

Actual result

List item and all its content is deleted

<p>&nbsp;</p><ul></ul>

Other details

  • Browser: any
  • OS: any
  • CKEditor version: …
  • Installed CKEditor plugins: enterkey

Same applies if initial data is set to

CKEDITOR.instances.editor.setData('<ul><li>Some text<br/><div>&nbsp;</div></li></ul>')
@jacekbogdanski jacekbogdanski added type:bug A bug. status:confirmed An issue confirmed by the development team. plugin:list The plugin which probably causes the issue. labels Mar 20, 2018
@jacekbogdanski
Copy link
Member

jacekbogdanski commented Mar 20, 2018

Hello,

I can confirm the issue. Your example JS can be simplified to CKEDITOR.instances.editor.setData('<ul><li>Some text<p></p></li></ul>').

Its broken when we put empty block element inside list item. To reproduce the issue a selection should be placed below list item:

listemptyparagraph

@mlewand mlewand added target:minor Any docs related issue that can be merged into a master or major branch. and removed target:minor Any docs related issue that can be merged into a master or major branch. labels Mar 21, 2018
@jacekbogdanski
Copy link
Member

Fixed in #2501

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. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

3 participants