Skip to content

Localization Switching Bug #12994

Open
Open
@nguyenvandang205

Description

@nguyenvandang205

Describe the Bug

When switching between locales, the Lexical editor fails to re-render properly. This results in the following issues:
• The editor content becomes unclickable and uneditable.
• The toolbar disappears or becomes unresponsive.
• The entire editor appears broken until the page is refreshed.

This behavior suggests the Lexical instance is not correctly reset or remounted on locale change.

Image

Link to the code that reproduces this issue

pnpx create-payload-app@latest -t blank

Reproduction Steps

I don’t have a reproduction repo at the moment, but here are clear reproduction steps:

  1. Go to the Admin panel.
  2. Create or edit a document that uses the Lexical editor.
  3. Switch to a different locale (e.g., from "en" to "vi").
  4. After switching, the Lexical editor fails to re-render:
    • The content box becomes unclickable.
    • The toolbar disappears or is unresponsive.
    • You cannot type or edit the content anymore.

Expected behavior:
Lexical should re-render properly and remain editable after switching localization.

Environment:

  • Payload version: [your version]
  • Plugin: @payloadcms/richtext-lexical
  • Browser: [e.g., Chrome 125]
  • OS: [e.g., macOS Sonoma]

Please let me know if a minimal reproduction is required — I can provide one later if needed.

Which area(s) are affected? (Select all that apply)

area: ui

Environment Info

pnpm payload info

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs-triagePossible bug which hasn't been reproduced yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions