Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

richtext-lexical: merging cells onto already merged cells throws errors #8062

Closed
rilrom opened this issue Sep 4, 2024 · 4 comments
Closed
Assignees

Comments

@rilrom
Copy link
Contributor

rilrom commented Sep 4, 2024

Link to reproduction

No response

Environment Info

Binaries:
  Node: 20.16.0
  npm: 10.8.1
  Yarn: 1.22.22
  pnpm: 9.9.0
Relevant Packages:
  payload: 3.0.0-beta.98
  next: 15.0.0-canary.104
  @payloadcms/db-postgres: 3.0.0-beta.98
  @payloadcms/email-nodemailer: 3.0.0-beta.98
  @payloadcms/graphql: 3.0.0-beta.98
  @payloadcms/live-preview: 3.0.0-beta.98
  @payloadcms/live-preview-react: 3.0.0-beta.98
  @payloadcms/next/utilities: 3.0.0-beta.98
  @payloadcms/plugin-cloud: 3.0.0-beta.98
  @payloadcms/plugin-form-builder: 3.0.0-beta.98
  @payloadcms/plugin-nested-docs: 3.0.0-beta.98
  @payloadcms/plugin-redirects: 3.0.0-beta.98
  @payloadcms/plugin-seo: 3.0.0-beta.98
  @payloadcms/richtext-lexical: 3.0.0-beta.98
  @payloadcms/translations: 3.0.0-beta.98
  @payloadcms/ui/shared: 3.0.0-beta.98
  react: 19.0.0-rc-06d0b89e-20240801
  react-dom: 19.0.0-rc-06d0b89e-20240801
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Wed Mar 2 00:30:59 UTC 2022
  Available memory (MB): 25582
  Available CPU cores: 16

Describe the Bug

When you have some merged cells, then attempt to merge another cell into those merged cells, errors are thrown.

lexical-error

Reproduction Steps

  1. Create a lexical rich text table (default 5x5).
  2. Merge 4 of the 5 top row cells.
  3. Attempt to merge the last cell into the other merged cells.
  4. Errors are thrown.

lexical-error-1

Adapters and Plugins

db-postgres, richtext-lexical

@rilrom rilrom added status: needs-triage Possible bug which hasn't been reproduced yet v3 labels Sep 4, 2024
@rilrom
Copy link
Contributor Author

rilrom commented Sep 4, 2024

Upon further inspection I am able to replicate this in lexical playground.

A bug report has already been raised with lexical. It's been open for over a year so not a good outlook for it to get fixed.

Edit: I have put together a fix, I will create a PR over at lexical.

@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Sep 4, 2024
@GermanJablo
Copy link
Contributor

That would be great @rilrom, thanks a lot!

@GermanJablo
Copy link
Contributor

I see this is going to be fixed in the next release of Lexical. Thanks @rilrom!

facebook/lexical#6607

Copy link
Contributor

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants