codex-team / codex-team/editor.js

[Bug]Uncaught TypeError: Cannot read property 'parentNode' of null

Open
#1,367 4 comments 3 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

**Describe a bug.**
When a user creates the header block and select substring of text and try to drag and put again in the same block, the user gets `Uncaught TypeError: Cannot read property 'parentNode' of null` on the console.

**Steps to reproduce:**
1.Go to editor.js sample document. (https://editorjs.io/)
2. Create a new Header Block
3. fill the block with some text
4. try to select substring of that text and drag that substring.
5.Release the text in the same block
6.You get an error
7.Caret behaves strangely after releasing that text.

Expected behaviour:
You shouldn't get an error.

Screenshots:
![screen-capture](https://user-images.githubusercontent.com/23169768/95894364-9a562080-0da6-11eb-8da7-4df4ce6b8a9a.gif)

Device, Browser, OS:
PC ,Chrome 85.0.4183.121 ,Windows 10

Editor.js version:
2.18.0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.