Skip to content

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

Closed

Description

@t-hamano

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

Activity

  1. t-hamano commented on May 4, 2024

    @t-hamano
    ContributorAuthor

    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.

  2. t-hamano commented on May 4, 2024

    @t-hamano
    ContributorAuthor

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

  3. added
    [Type] RegressionRelated to a regression in the latest release
    and removed
    [Type] BugAn existing feature does not function as intended
    on May 13, 2024
  4. afercia commented on May 13, 2024

    @afercia
    Contributor

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

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

  5. liviopv commented on May 24, 2024

    @liviopv

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

    CleanShot.2024-05-24.at.11.47.46.mp4
  6. ellatrix commented on May 24, 2024

    @ellatrix
    Member

    There's a PR #61389 waiting for approval

  7. liviopv commented on May 28, 2024

    @liviopv

    @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
  8. t-hamano commented on May 28, 2024

    @t-hamano
    ContributorAuthor

    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

Metadata

Metadata

Assignees

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions