Skip to content

Multiple BlockNote mounted editors cause flushSync errors #1618

Open
@RobinClowers

Description

@RobinClowers

Describe the bug
When multiple editors are mounted at once, they throw flushSync errors.

flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.

Similar to #1513.

To Reproduce
@edwandr helpfully created this minimal example that shows the issue. Load the page and then check the browser console.

I've forked the original reproduction and updated the dependencies to react 19 and blocknote 0.31.1.

Misc

  • Node version: 22.13.0
  • Package manager: Bun 1.2.1
  • Browser: Firefox 137
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Metadata

Metadata

Assignees

No one assigned

    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