codex-team / codex-team/editor.js
calling renderFromHTML with empty string or blank tags causes crash when you click on the editor holder
- Lingua principale
- TypeScript
- Stelle
- 32k
- Fork
- 2.2k
- Merge medio
- 1g 13h
- PR unite (30g)
- 2
Descrizione
Describe a bug.
Just as the title says. This is the error you get:
```TypeError: Cannot read properties of undefined (reading 'holder')```
Steps to reproduce:
1. Go to [my codesandbox](https://codesandbox.io/s/editorjs-renderfromhtml-bug-repro-xpl50e?file=/src/index.js) to see a minimal reproduction of the error.
2. Click on where the editor should be, in the browser window.
3. Uncomment the other lines to see it fail with "" and see it pass with non-blank tags or non-blank strings.
Expected behavior:
The editor should render with no content.
Screenshots:

Device, Browser, OS: macOS, codesandbox
Editor.js version: latest
Plugins you use with their versions: error happens independently from plugins
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia dal CodeSandbox collegato e riproduci il crash usando una stringa vuota e tag vuoti, quindi segui il punto di ingresso renderFromHTML attraverso la gestione del clic per il contenitore dell’editor. Il lavoro è completato quando entrambi i casi di input vuoto visualizzano un editor vuoto e facendo clic sul contenitore non viene più generato il TypeError segnalato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, typescript
- Ambito
- frontend, web-dev
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100