codex-team / codex-team/editor.js

Uncaught TypeError: Cannot read properties of undefined (reading 'onFocus')

Open
#2,399 3 comments 1 reaction 0 assignees View on GitHub
questionable
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Describe a bug.
Uncaught TypeError: Cannot read properties of undefined (reading 'onFocus'), shows up when I hit tab button on the editor js or some other keys while selecting the items

Expected behavior:
It should focus on the selected content or block, It does sometimes but not.
How can I handle such unexpected errors?

Error Message:
```
Uncaught TypeError: Cannot read properties of undefined (reading 'onFocus')
at onFlip (editorjs.mjs:3729:1)
at editorjs.mjs:3592:1
at Array.forEach ()
at G.flipCallback (editorjs.mjs:3592:1)
at G.flipRight (editorjs.mjs:3523:1)
at G.onKeyDown (editorjs.mjs:3462:1)

```
![image](https://github.com/codex-team/editor.js/assets/33618258/44460f58-1e24-4538-8d0a-8c8b5eb0ebae)

Device, Browser, OS: Windows/MacOs

Editor.js version: 2.26.2

Plugins you use with their versions:
"@editorjs/checklist": "^1.4.0",
"@editorjs/delimiter": "^1.3.0",
"@editorjs/editorjs": "^2.26.2",
"@editorjs/embed": "^2.5.3",
"@editorjs/header": "^2.7.0",
"@editorjs/image": "^2.8.1",
"@editorjs/inline-code": "^1.4.0",
"@editorjs/link": "^2.5.0",
"@editorjs/marker": "^1.3.0",
"@editorjs/nested-list": "^1.3.0",
"@editorjs/paragraph": "^2.9.0",
"@editorjs/quote": "^2.5.0",
"@editorjs/raw": "^2.4.0",
"@editorjs/table": "^2.1.2",
"@editorjs/warning": "^1.3.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.