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 with keyboard shortcut deletes all the content of the classic block #64771

Open
2 tasks done
Kerfred opened this issue Aug 24, 2024 · 3 comments
Open
2 tasks done
Labels
[Block] Classic Affects the Classic Editor Block [Type] Bug An existing feature does not function as intended

Comments

@Kerfred
Copy link

Kerfred commented Aug 24, 2024

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
@Kerfred Kerfred added the [Type] Bug An existing feature does not function as intended label Aug 24, 2024
@t-hamano
Copy link
Contributor

t-hamano commented Aug 24, 2024

Thanks for the report. I was able to reproduce the issue. And this problem certainly seems to have first appeared in WP6.6.

There are two conditions to reproduce this issue:

  • The editor is not an iframe, i.e. custom fields are enabled, etc. If the editor is not an iframe, the Classic Block is modal and this issue cannot be reproduced.
  • Copy text from outside WordPress.

@t-hamano t-hamano added the [Block] Classic Affects the Classic Editor Block label Aug 24, 2024
@t-hamano
Copy link
Contributor

I have determined that this issue was caused by #54543.

@Kerfred
Copy link
Author

Kerfred commented Nov 13, 2024

WordPress 6.7 has been released. And this issue is still not fixed.
This is very annoying to not be able to use the CTRL+v shortcut during the post edition.

Does anyone know when this will be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Classic Affects the Classic Editor Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants