Skip to content

Conversation

@kaushik552k
Copy link

Summary

This PR addresses a bug in the text editor where adding text a second time would not display the new text, even though an empty text entry appeared in the timeline.

Issue Description

  • Problem: The text payload contained a static id, causing new text additions to replace the existing text.
  • Behavior: On first addition, text is correctly added. On subsequent additions, the timeline shows an empty text (due to the static id) rather than adding a new text element.

Changes Made

  • Removed the id from the TEXT_ADD_PAYLOAD.
  • Updated the handleAddText function to include id: generateId() so that every call produces a unique id.

How to Test

  1. Open the text editor.
  2. Add text multiple times.
  3. Verify that each text element is added with a unique id and is displayed correctly.

Previously, the text payload used a static id causing new text additions to overwrite the previous text. By removing the static id and generating a new id with generateId(), each text addition now creates a unique entry.
@kaushik552k kaushik552k reopened this Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant