Skip to content

Pasting with keyboard shortcut deletes all the content of the classic block #64771

@Kerfred

Description

@Kerfred

Description

Since WP 6.6.1, when I paste a text using the keyboard shortcut COMMAND + v on Mac in the post content that uses a classic block, it deletes the whole content.

Here is a video that shows the issue: https://www.awesomescreenshot.com/video/30790475?key=7e50f467f28e2fce0be54c409b1a75fc

The issue doesn’t happen when I paste the text using the mouse (right click + Paste). It happens only when doing it with the keyboard.

Step-by-step reproduction instructions

  1. Edit a post containing a classic block
  2. Copy a text from outside WordPress
  3. Paste this text inside the post content using the keyboard shortcut COMMAND + v (or CTRL + v on PC)

Screenshots, screen recording, code snippet

https://www.awesomescreenshot.com/video/30790475?key=7e50f467f28e2fce0be54c409b1a75fc

Environment info

WordPress 6.6.1
Gutenberg 19.0.0 (or even with the default Gutenberg installed in WordPress)
Chrome 127.0
Mac OS 14.6.1

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] ClassicAffects the Classic Editor Block[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions