Skip to content

TypeError: Cannot read properties of null (reading 'nextElementSibling') #369

@thuanan0105

Description

@thuanan0105

Description
Uncaught runtime error when using suneditor-react.

Error Message:
ERROR Cannot read properties of null (reading 'nextElementSibling') TypeError: Cannot read properties of null (reading 'nextElementSibling') at HTMLDivElement.onKeyDown_wysiwyg (http://localhost:3000/static/js/vendors-node_modules_reactstrap_esm_Form_js-node_modules_reactstrap_esm_NavLink_js-node_modul-af9569.chunk.js:18724:80)

To Reproduce
Steps to reproduce the behavior:

  1. Render suneditor-react in a React component.
  2. Type content inside the editor:

<ul><li><span>Privacy Policy</span></li><li><span>Help Center</span></li><li><span>Hotline</span></li></ul>
Image

  1. Press Ctrl+A (or Cmd+A on Mac) to select all content.
  2. Press Delete (or fn+Delete on Mac).
  3. Observe the console error.

Image

Expected behavior
The editor should allow the deletion of all content without throwing an error.

Environment

  • Suneditor-react version: 2.47.0
  • Suneditor version: 3.6.1
  • React version: 19.0.0

Desktop (please complete the following information):

  • OS: MAC
  • Browser: Chrome

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions