Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Cannot read properties of undefined (reading 'holder') #2090

Open
applegrew opened this issue Jun 27, 2022 · 13 comments
Open

[Bug] Cannot read properties of undefined (reading 'holder') #2090

applegrew opened this issue Jun 27, 2022 · 13 comments
Labels

Comments

@applegrew
Copy link

Describe a bug.

Steps to reproduce:

  1. Go to https://codepen.io/applegrew/pen/RwMbqdo
  2. Open browser console and click within the black rectangle randomly. You will see the error mentioned here.
  3. Click on "Readonly" checkbox to uncheck it and you will see that clicking inside the box still results into this error.

Expected behavior:
There should be no JS error.

Screenshots:
Screenshot 2022-06-27 at 9 37 15 PM

Device, Browser, OS: Chrome on MacOS

Editor.js version: 2.25.0

Plugins you use with their versions: None

@applegrew applegrew added the bug label Jun 27, 2022
@7polo
Copy link

7polo commented Jul 9, 2022

same question
when 'blocks' property is empty

@MEBonham
Copy link

I'm running into what I think is the same issue.

@AlexRMU
Copy link

AlexRMU commented Oct 29, 2022

Use blocks: [{ type: "paragraph", data: {} }]

@berkaygurbuz
Copy link

I've got same error. any updates ?

@644792799
Copy link

Use

...
data: {
  time: (new Date()).getTime(),
  version: '2.25.0',
  blocks: [{
	type: 'paragraph',
	data: {
	  text: '<a></a>'
	}
  }]
}
...

@antoineol
Copy link

antoineol commented Jun 16, 2023

I also reproduce with editor.blocks.renderFromHTML('<p></p>'); without the "readonly" switch, see this codepen:

https://codepen.io/antoine_ol/pen/BaGKaKE

Open the browser console and click anywhere in the page. You will see errors.

Add any content inside the <p> tag (e.g. <p>a</p>) and it will work. But it fails with empty paragraph content. It not only shows an error in the console, but also fails to render the editor, which is crashed.

@johannbuscail
Copy link

i have the same issue, any update ?

@DarioRega
Copy link

same issue here, it is when i set the the data dynamically with the editor.render({...}) and in fact when it is empty it throw that same error

@justynjozwiak
Copy link

same trouble here! also editor.render({...})

@devon2018
Copy link

I got this same issue and turns out it was because i had applied a tune to the paragraph component but the tune had not been registered (I commented it out while testing something else.)

@Lubin7792
Copy link

When Bolcks is set to [], an error will also be reported

@backtrackjack
Copy link

bumping 😭

@fefeswa
Copy link

fefeswa commented Sep 12, 2023

version 2.27.2 don't have this problem and need actualization node js to 18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests