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

Editor crashes after pressing Enter in a to-do list item with soft-break #6585

Closed
Mgsy opened this issue Apr 9, 2020 · 2 comments · Fixed by #7562
Closed

Editor crashes after pressing Enter in a to-do list item with soft-break #6585

Mgsy opened this issue Apr 9, 2020 · 2 comments · Fixed by #7562
Labels
package:list support:3 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@Mgsy
Copy link
Member

Mgsy commented Apr 9, 2020

📝 Provide detailed reproduction steps (if any)

  1. Go to https://ckeditor.com/ckeditor-5/demo/
  2. Put the caret at the end of the paragraph
  3. Press Shift + Enter
  4. Transform the block into the to-do list
  5. Move the selection to the end of the previous line
  6. Press Enter

❌ Actual result

The editor crashes.

📃 Other details

Error

Uncaught CKEditorError: view-writer-cannot-break-empty-element
    at Cn._breakAttributes (https://ckeditor.com/assets/libs/ckeditor5/18.0.0/ckeditor.js:5:221317)
    at Cn.breakAttributes (https://ckeditor.com/assets/libs/ckeditor5/18.0.0/ckeditor.js:5:213368)
    at Cs.Ks.downcastDispatcher.on.priority (https://ckeditor.com/assets/libs/ckeditor5/18.0.0/ckeditor.js:5:321063)
    at Cs.fire (https://ckeditor.com/assets/libs/ckeditor5/18.0.0/ckeditor.js:5:159513)
    at Cs.convertSelection (https://ckeditor.com/assets/libs/ckeditor5/18.0.0/ckeditor.js:5:293257)
    at https://ckeditor.com/assets/libs/ckeditor5/18.0.0/ckeditor.js:5:319424
    at hs.change (https://ckeditor.com/assets/libs/ckeditor5/18.0.0/ckeditor.js:5:262600)
    at Za.Ks.listenTo.priority (https://ckeditor.com/assets/libs/ckeditor5/18.0.0/ckeditor.js:5:319336)
    at Za.fire (https://ckeditor.com/assets/libs/ckeditor5/18.0.0/ckeditor.js:5:159513)
    at Za._handleChangeBlock (https://ckeditor.com/assets/libs/ckeditor5/18.0.0/ckeditor.js:5:381807)

It seems to not be a regression, as I can reproduce it in v15.


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@Mgsy Mgsy added type:bug This issue reports a buggy (incorrect) behavior. package:list support:1 An issue reported by a commercially licensed client. labels Apr 9, 2020
@wwalc
Copy link
Member

wwalc commented Apr 9, 2020

Sounds similar to #5866 ?

@Reinmar
Copy link
Member

Reinmar commented Apr 9, 2020

For 99% that's a DUP, but only resolving the original "todo lists's mapping is completly broken" will tell us that for 100%.

@Mgsy Mgsy added this to the next milestone Apr 20, 2020
jodator added a commit that referenced this issue Jul 8, 2020
Fix (list): Editor should not crash on the enter keypress inside a to-do list item containing soft-breaks. Closes #5866. Closes #6585.

Fix (list): Links inside a to-do list item should be properly converted to HTML. Closes #5779.

Feature (engine): Changed visibility scope of `Mapper#findPositionIn()` from `private` to `public`.
@Reinmar Reinmar modified the milestones: next, iteration 34 Jul 13, 2020
@lslowikowska lslowikowska added support:3 An issue reported by a commercially licensed client. and removed support:1 An issue reported by a commercially licensed client. labels Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:list support:3 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants