codex-team / codex-team/editor.js

[Bug] 'getBlockByChildNode', Cannot read property 'parentNode' of null

Open
#1,279 1 comment 2 reactions 0 assignees View on GitHub
should be tested
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

![uKRky.png](https://s3.jpg.cm/2020/08/24/uKRky.png)

editor.js:834 addRange(): The given range isn't in document.

It's hard to reproduce, random occurrence.

And the error code is:

```
key: 'getBlockByChildNode',
value: function (t) {
p.default.isElement(t) || (t = t.parentNode); // ❌ ← ERROR LINE
var e = t.closest('.'.concat(f.default.CSS.wrapper));
return this.blocks.find(function (t) {
return t.holder === e;
});
},
```

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.