codex-team / editor.js

A block-style editor with clean JSON output
https://editorjs.io
Apache License 2.0
28.95k stars 2.09k forks source link

Multiple line breaks and bringing the cursor back causes an error. #2368

Open kaaaaaaaaaaai opened 1 year ago

kaaaaaaaaaaai commented 1 year ago

Describe a bug.

TypeError: undefined is not an object (evaluating 'l.children.length')

Steps to reproduce:

  1. write paragph
  2. shift+enter for multiple line breaks
  3. Returns the cursor to the start of a new line.
  4. Press the right button to advance the cursor.
  5. and back

Expected behavior:

Screenshots:

https://github.com/codex-team/editor.js/assets/2194021/f17c24c4-bb3b-4e76-b6c3-dfd1596972da

Device, Browser, OS:

Editor.js version: "@editorjs/editorjs": "^2.27.0",

hosting-gl commented 1 year ago

We have exactly same problem, with safari.