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

Block Editor: Unable to paste text into text field inside block #61377

Closed
t-hamano opened this issue May 4, 2024 · 7 comments · Fixed by #61389
Closed

Block Editor: Unable to paste text into text field inside block #61377

t-hamano opened this issue May 4, 2024 · 7 comments · Fixed by #61389
Assignees
Labels
[Feature] Paste [Package] Block editor /packages/block-editor [Status] In Progress Tracking issues with work in progress [Type] Regression Related to a regression in the latest release

Comments

@t-hamano
Copy link
Contributor

t-hamano commented May 4, 2024

Description

Some blocks have text fields. For example, Embed block, Shortcode block, etc. Pasting text into the text field of these blocks deletes the blocks and creates a Paragraph block in their place.

I think this can happen with any block that has a text field, not just the core block.

This problem does not seem to occur in WP6.5.

Step-by-step reproduction instructions

  • Insert Shortcode block, Embed block, etc.
  • Copy text from elsewhere and paste it into the text field.
  • It should be converted to a Paragraph block.

Screenshots, screen recording, code snippet

Expected Behaviour (WP6.5)

38ab23ad65493e18ff868e7cc8b8d4b6.mp4

Actual Behaviour (Latest Gutenberg)

9a623c0c7847409376493b9ac2785651.mp4

Environment info

No response

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

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Feature] Paste [Package] Block editor /packages/block-editor labels May 4, 2024
@t-hamano
Copy link
Contributor Author

t-hamano commented May 4, 2024

I'm adding this to the project board because I think this issue has a very large impact and should be fixed in WP6.6.

@t-hamano
Copy link
Contributor Author

t-hamano commented May 4, 2024

After going back through the commits, it appears that this issue occurred in #54543.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label May 6, 2024
@afercia afercia added [Type] Regression Related to a regression in the latest release and removed [Type] Bug An existing feature does not function as intended labels May 13, 2024
@afercia
Copy link
Contributor

afercia commented May 13, 2024

This problem does not seem to occur in WP6.5.

Right. As also reported on #61566 this appears to be a regression.

@liviopv
Copy link

liviopv commented May 24, 2024

The issue is still present on the Shortcode Block as of 18.4:

CleanShot.2024-05-24.at.11.47.46.mp4

@ellatrix
Copy link
Member

There's a PR #61389 waiting for approval

@liviopv
Copy link

liviopv commented May 28, 2024

@ellatrix reopening because I'm still getting a similar behavior when pasting content into the Classic Block when running 18.4.1 and I'm not sure if that's intentional:

CleanShot.2024-05-28.at.12.08.03.mp4

Steps to reproduce

  1. Add a Classic Block to a page
  2. Paste content into the Classic Block
  3. The Classic Block will transform into other blocks like Paragraph

@t-hamano
Copy link
Contributor Author

I tried testing with Playground and the latest Gutenberg, but I couldn't reproduce this problem.

From looking at your video, the Classic block is not opened as a dialog, so I would expect the editor to not be an iframe, which means custom fields are enabled. I tested it in the same environment and it doesn't convert to other blocks 🤔

6786e2164ed12fca03085fa7268613b4.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Paste [Package] Block editor /packages/block-editor [Status] In Progress Tracking issues with work in progress [Type] Regression Related to a regression in the latest release
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants