-
-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Background Information
When attempting to save sources using the button component (the "+" icon), the source is not correctly persisted.
After submit/refresh (Actual State):

Notably, this bug does not occur when adding sources via the floating component. Furthermore, using the floating component prevents related issues like #2154 from occurring, suggesting that for both issues the root cause is specifically tied to the source creation logic within the "+" icon editor component.
Steps to Reproduce
- Start the fact checking for a sentence.
- Add sources using the "+" icon button within the editor.
- Submit the form.
- Refresh the page.
- Observe that the source was not saved correctly and does not appear in the list.
How
The issue likely stems from a discrepancy in how EditorAddSources handles the node insertion or state update compared to the FloatingLinkToolbar. Specifically, the manual command.insertNode call or the setEditorSources synchronization might be failing to trigger the necessary document change events required for the backend to recognize and persist the new source.
Expected Behavior
Sources added via the "+" icon button should be correctly inserted into the editor document and persisted to the database, maintaining consistency after a page refresh, identical to the behavior of the floating link component.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
