Skip to content

Bug: Fonts not being saved when in claim review #2252

@LuizFNJ

Description

@LuizFNJ

Background Information

When attempting to save sources using the button component (the "+" icon), the source is not correctly persisted.

Sources added (UI State):
Image

After submit/refresh (Actual State):
Image

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

  1. Start the fact checking for a sentence.
  2. Add sources using the "+" icon button within the editor.
  3. Submit the form.
  4. Refresh the page.
  5. 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

Labels

bugSomething isn't working

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions