Skip to content

Refresh pages content will cause SideMenu false trigger #603

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

Closed
1 task
tcper opened this issue Mar 5, 2024 · 0 comments · Fixed by #604
Closed
1 task

Refresh pages content will cause SideMenu false trigger #603

tcper opened this issue Mar 5, 2024 · 0 comments · Fixed by #604
Labels
bug Something isn't working

Comments

@tcper
Copy link
Contributor

tcper commented Mar 5, 2024

Describe the bug
I have a notes list, select list item will refresh blocknote content,
The scenario is
request content from server -> remove all blocks -> insert all blocks

Pseudocode:

editor.removeBlocks(editor.topLevelBlocks.map(_ => _.id))
editor.insertBlocks(blockList, id, 'before')

After that, when you open Color menu, the whole sidemenu will always follow the mouse, changing hover blocks, without correct frozen.
20240305-135220

To Reproduce

  1. init a content
  2. Clear all blocks
  3. init a new content
  4. repeat more than 2 times

And I find it, when you refresh content, SideMenuPlugin will bind more than 1 times, it will cause mousemove event bind many times.

So, I guess, is that a proper way to refresh blocknote content? Or my way is not correct?

Misc

  • Node version: v18.17.0
  • Package manager: 9.8.0
  • Browser: 120.0.6099.109
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖
@tcper tcper added the bug Something isn't working label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant