Skip to content

Rich text editor duplicates content on template updates #22758

@SinghaAnirban005

Description

@SinghaAnirban005

Found a bug? Please fill out the sections below. 👍

Issue Summary

The Lexical based rich text editor in the ToolbarPlugin component duplicates content when the updateTemplate prop changes. When a user types content (Eg --> "hi all") and then triggers a template update the content gets duplicated within the same HTML span element resulting in "hi allhi all"

Steps to Reproduce

  1. Go to Profile
  2. Try to write something in your bio/about section
  3. Hit the update button

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?

Actual Results

  • Content gets duplicated --> "hi all" becomes "hi allhi all"

Expected Results

  • Content should remain as originally typed -> "hi all"

Technical details

  • Browser: Firefox
  • OS: Ubuntu
  • NodeJS : v22

Evidence

Screencast.from.2025-07-27.14-04-33.webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions