Skip to content

[BUG]: Text vanishes when adjusting margin via horizontal top bar drag in document editor #36

Description

@sanghamitradash021

Describe the bug

When dragging the top horizontal bar in the document editor to adjust the
margin, all existing text in the editor disappears. Additionally, any new text
typed after this action also does not appear the editor appears to lose its
content state entirely after the margin adjustment interaction.

Steps to reproduce

  1. Open a document in the editor
  2. Type some text into the editor canvas
  3. Click and drag the top horizontal bar (margin adjuster) horizontally
  4. Observe that existing text disappears during or after the drag
  5. Attempt to type new text — it does not appear either

Expected behavior

Dragging the top horizontal bar to adjust the margin should reflow/reposition
text accordingly. All existing content should remain visible, and the editor
should continue to accept new input normally after the margin is adjusted.

What is actually happening?

All rendered text vanishes from the canvas when the top bar is dragged
horizontally. The editor does not recover subsequent keystrokes produce no
visible output. The document content appears to be lost or the canvas render
state becomes broken after the margin drag interaction.

Screenshots

No response

Any additional comments?

This appears to be a canvas state management issue in
@mindfiredigital/react-canvas-editor. The margin drag likely triggers a canvas
re-render or resize that clears the drawing context without re-painting the
content, and may also be disrupting the editor's internal state so new input
is not rendered. This is a critical data-loss bug — users may believe their
work has been deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions