Directory

Dragging multiple images into the editor no longer works with 17.6.0 · Issue #58653 · WordPress/gutenberg · GitHub
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

Dragging multiple images into the editor no longer works with 17.6.0 #58653

Closed
mrfoxtalbot opened this issue Feb 4, 2024 · 1 comment · Fixed by #58686
Closed

Dragging multiple images into the editor no longer works with 17.6.0 #58653

mrfoxtalbot opened this issue Feb 4, 2024 · 1 comment · Fixed by #58686
Assignees
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@mrfoxtalbot
Copy link

mrfoxtalbot commented Feb 4, 2024

Description

I find I am unable to drag & drop more than one image into the editor.
One image at a time, it works fine. More than one image, it does not respond.

Step-by-step reproduction instructions

  1. Create a new post
  2. Select two images in your computer and try to add the to the post by dragging them into it
  3. Notice how the editor does not respond.

Screenshots, screen recording, code snippet

I noticed this on a WordPress.com site but I can reproduce it on a self-hosted site using the Gutenberg plugin Version 17.6.0

trim_G5828d.mp4

If I deactivate the plugin and use the core version of the editor (6.4.3), it works as expected

trim_F3qhwa.mp4

Please note that if we add a placeholder Gallery block, it IS possible to drag multiple images.

Screen.Capture.on.2024-02-05.at.00-53-37.mp4

Environment info

  • WP 6.4.3 running Twenty Twenty-Three
  • Gutenberg plugin v17.6.0

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

@mrfoxtalbot mrfoxtalbot added [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release [Block] Gallery Affects the Gallery Block - used to display groups of images labels Feb 4, 2024
@mrfoxtalbot mrfoxtalbot changed the title [Regression in 17.6.0] Dragging multiple images into the editor no longer works Dragging multiple images into the editor no longer works (17.6.0) Feb 4, 2024
@mrfoxtalbot mrfoxtalbot changed the title Dragging multiple images into the editor no longer works (17.6.0) Dragging multiple images into the editor no longer works with 17.6.0 Feb 4, 2024
@t-hamano
Copy link
Contributor

t-hamano commented Feb 5, 2024

Thanks for the report.

After going back through the commits, it seems that this problem first occurred in #56186, which improved drag and drop. When dragging and dropping multiple images into the editor, the following error is logged in the browser console:

index.js:257 Uncaught TypeError: blocks.map is not a function
    at index.js:257:35

The error is pointing to this line:

const blocksClientIds = blocks.map( ( block ) => block.clientId );

mcsf added a commit that referenced this issue Feb 5, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Feb 5, 2024
mcsf added a commit that referenced this issue Feb 5, 2024
Fixes #58653

Co-authored-by: mcsf <mcsf@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: mrfoxtalbot <mrfoxtalbot@git.wordpress.org>
ellatrix added a commit that referenced this issue Feb 5, 2024
Fixes #58653

Co-authored-by: mcsf <mcsf@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: mrfoxtalbot <mrfoxtalbot@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants