Error when unloading component while having suggestion menu open
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 💖
Hi BlockNote team!
This issue persists, and it's critical. Any updates here?
Likely the same root cause as: https://github.com/TypeCellOS/BlockNote/issues/2106 which needs a new approach for a fix.
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
Oh actually, I was wrong about the root cause here on second look. Re-opening. I've submitted a PR with the fix
Now, released