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

Pasting in block results in pasting the content twice in Firefox #10634

Open
khnn opened this issue Jan 17, 2025 · 1 comment
Open

Pasting in block results in pasting the content twice in Firefox #10634

khnn opened this issue Jan 17, 2025 · 1 comment
Assignees
Labels
dependency-issue The issue is in a dependency of payload - not payload itself plugin: richtext-lexical @payloadcms/richtext-lexical

Comments

@khnn
Copy link

khnn commented Jan 17, 2025

Describe the Bug.

When pasting text from the clipboard to a custom block into the lexical editor the text is pasted twice. I only experienced that in Firefox.

pasting_ff.mov

Reproduction Steps

  • Create a payload app via CLI
  • Use the website template
  • Add a custom block to the existing BlocksFeature in the post's collection like this
// src/collections/Posts/index.ts

..
export const ContactBlock: Block = {
  slug: "contact",
  fields: [
    {
      name: "first",
      label: "first line",
      required: true,
      type: "text",
      admin: {
        description:
          "...",
      },
    },
    {
      name: "two",
      label: "second line",
      required: true,
      type: "text",
      admin: {
        description:
          "...",
      },
    },
  ],
  interfaceName: "ContactBlock",
};
...
BlocksFeature({ blocks: [Banner, Code, MediaBlock, ContactBlock] }),
...
  • Add the new block to the editor
  • Copy some text (I used Apple Notes and other sources to copy from)
  • Paste it in the first text field
  • The text is appearing in the field and another time under the block (see video)

Environment Info

Payload: 3.17.1
Next: 15.1.4
Node: v20.17.0
Firefox: 134.0.1 (aarch64)
@khnn khnn added area: ui Related to the admin panel. status: needs-triage Possible bug which hasn't been reproduced yet labels Jan 17, 2025
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Jan 17, 2025
@AlessioGr AlessioGr added the plugin: richtext-lexical @payloadcms/richtext-lexical label Jan 19, 2025
@GermanJablo GermanJablo added dependency-issue The issue is in a dependency of payload - not payload itself and removed area: ui Related to the admin panel. labels Jan 20, 2025
@GermanJablo
Copy link
Contributor

This is a Lexical issue. I've opened a PR on their repository that fixes it:
facebook/lexical#7072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency-issue The issue is in a dependency of payload - not payload itself plugin: richtext-lexical @payloadcms/richtext-lexical
Projects
None yet
Development

No branches or pull requests

3 participants