Fix: ensure tools are configured before editor renders on note switch - #355
Fix: ensure tools are configured before editor renders on note switch#3557eliassen wants to merge 13 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR addresses an intermittent Editor.js rendering issue when switching between notes by ensuring the editor does not render until tool scripts/configuration have been rebuilt for the newly selected note.
Changes:
- Reset
isEditorReadyandtoolsUserConfigLoadedbefore re-loading tool scripts onnoteAndUserToolschanges. - Ensure the editor component remounts only after tools are configured, preventing blocks from rendering with stale/missing tool configuration.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Some changes have been made due to a discovered bug. A bug was discovered related to double rendering of the editor when switching to another note: When Fix:
|
Problem:
Root Cause:
This issue occurs because the toolsUserConfigLoaded and isEditorReady flags are not properly reset. As a result, the editor may render before the tools are fully configured, causing certain blocks to fail to display.
What done: