codex-team / codex-team/editor.js

[Bug] `Cannot read property 'updateCurrentInput' of undefined` when adding two instances of the editor

Open
#1,557 1 comment 0 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 I try to add 2 instances, the editor throws an error:
```
editorjs@latest:6 Uncaught TypeError: Cannot read property 'updateCurrentInput' of undefined
at y.value (editorjs@latest:6)
at k.value (editorjs@latest:6)
at HTMLDocument. (editorjs@latest:6)
```

Steps to reproduce:
1. add the EditorJS script
2. Add 2 divs with different ID (ex: `editor1` and `editor2`)
3. Initialize those divs with the editor
4. try clicking the (+) icon and adding some blocks
5. Check console

Expected behavior:
No errors when creating multiple instances

Screenshots:
![image](https://user-images.githubusercontent.com/17980909/108765996-878efc00-758f-11eb-8693-990a82bb9d20.png)

Device, Browser, OS:
Windows 10, Chrome Version 88.0.4324.150 (Official Build) (64-bit)

Editor.js version:
Latest

Plugins you use with their versions:
No plugins, straight from the CDN

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.