gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Pasting an image onto the Media + Text block is broken

Open ellatrix opened this issue 3 years ago • 3 comments

Description

It's appended to the text section instead of replacing the placeholder.

Step-by-step reproduction instructions

Insert a media + text block, select the block, and paste an image.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

Yes, No

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

Yes

ellatrix avatar Nov 12 '23 16:11 ellatrix

I wan't able to reproduce the bug. Whenever I paste an image while the Media & Text block is selected, the block is transformed into an Image block.

I tested this on:

  • WordPress: 6.8.1
  • Gutenberg: 20.9.0
  • Browser: Chrome 136
  • OS: macOS 14.6

https://github.com/user-attachments/assets/d71d0a37-d659-4383-b6ad-846f18aa013e

The only time the image was appended to the content/text section was when I specifically selected that section before pasting the image, which seems to be the expected behaviour.

https://github.com/user-attachments/assets/45b43744-c65a-4a8a-915c-9f90c50e78c4

BugReportOnWeb avatar Jun 06 '25 08:06 BugReportOnWeb

I can replicate that the issue remains but is different. Rather than it being appended to the text section, it is inserted as an image, rather than using the Media placeholder. I'd expect when I paste an image that it would replace the Media/image part but leave behind the text for me to then write. This was using WP 6.8.3.

annezazu avatar Nov 07 '25 02:11 annezazu

Thanks for sharing the issue i agree with @BugReportOnWeb and @annezazu i am not able to reproduce exact issue but the thing i am facing is when you paste an image while Media & Text Block is selected then it automatically gets converted into Image Block and if you choose text part and paste an image then its appended into text section.

https://github.com/user-attachments/assets/f7a6f845-e0ef-42bf-9c72-d2b5558db829

dpmehta avatar Feb 26 '26 12:02 dpmehta