BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Error when unloading component while having suggestion menu open

Open SimonSimCity opened this issue 1 year ago • 5 comments

Describe the bug

If the BlockNoteView component is unmounted while the suggestion menu is open, the following error is thrown:

Uncaught Error: [tiptap error]: The editor view is not available. Cannot access view['dom']. The editor may not be mounted yet.

https://jam.dev/c/8f9db200-26a1-4a9a-af0e-f923a6b3cce9

To Reproduce

https://stackblitz.com/edit/github-gt3v6nbk?file=src%2FApp.tsx

Misc

  • Node version: v20.19.1.
  • Package manager: pnpm
  • Browser: Chrome
  • [ ] I'm a sponsor and would appreciate if you could look into this sooner than later 💖

SimonSimCity avatar Oct 29 '25 11:10 SimonSimCity

Hi BlockNote team!

This issue persists, and it's critical. Any updates here?

expiante avatar Nov 17 '25 11:11 expiante

Likely the same root cause as: https://github.com/TypeCellOS/BlockNote/issues/2106 which needs a new approach for a fix.

nperez0111 avatar Nov 17 '25 13:11 nperez0111

Should be resolved with: https://github.com/TypeCellOS/BlockNote/releases/tag/v0.42.2

We were trying to fix another bug, but it has caused more issues than it fixed

nperez0111 avatar Nov 19 '25 11:11 nperez0111

Oh actually, I was wrong about the root cause here on second look. Re-opening. I've submitted a PR with the fix

nperez0111 avatar Nov 19 '25 11:11 nperez0111

Now, released

nperez0111 avatar Nov 19 '25 12:11 nperez0111