Skip to content

custom block Copying and pasting will result in an error #1149

Closed
@q2177329q

Description

@q2177329q

Describe the bug
987.94bd8b52946dbc4b.js:9 Uncaught TypeError: Cannot read properties of null (reading 'firstChild')
at Y.addAll (987.94bd8b52946dbc4b.js:9:94126)
at Y.addElementByRule (987.94bd8b52946dbc4b.js:9:94028)
at Y.addElement (987.94bd8b52946dbc4b.js:9:92610)
at Y.addDOM (987.94bd8b52946dbc4b.js:9:91128)
at Y.addAll (987.94bd8b52946dbc4b.js:9:94220)
at _.parseSlice (987.94bd8b52946dbc4b.js:9:87860)
at eW (849baa33.2286729f2173c959.js:1:38904)
at tr (849baa33.2286729f2173c959.js:1:51532)
at tK.pasteHTML (849baa33.2286729f2173c959.js:1:90793)
at C.paste (4018.8ec8146930b55b85.js:1:149304)

To Reproduce
https://www.blocknotejs.org/docs/custom-schemas/custom-blocks#custom-block-types. the sample has the same issue, here is a video. and The procedure is Select some text -> copy(command + C on Mac) -> paste(command + V on mac). you will see the error log

CleanShot.2024-10-14.at.17.12.20.mp4

Misc

  • Node version: v18.17.0
  • Package manager: npm
  • Browser: chrome v 126
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions