Make WordPress Core

Opened 16 months ago

Closed 16 months ago

Last modified 11 months ago

#54902 closed defect (bug) (fixed)

Media Library Overlay Drag-and-Drop To Reorder Images Does Not Work In WP 5.9

Reported by: linux4me2's profile linux4me2 Owned by: clorith's profile Clorith
Milestone: 5.9.1 Priority: normal
Severity: major Version: 5.9
Component: External Libraries Keywords: has-testing-info has-patch fixed-major
Focuses: javascript Cc:

Description

The drag-and-drop functionality in WP media library overlay (dialog box) to reorder images doesn't work in WP 5.9, but it did in WP 5.8.x.

To reproduce the issue:

  • In WP 5.9, create a new Gallery Block in a post using more than one image.
  • Use the List View to select the Gallery
  • Click the Media Library link to open the Add to Gallery dialog box
  • Click the Edit Gallery link
  • Try to drag-and-drop an image to reorder it in the gallery

In WP 5.8.x, it was possible to reorder the images with drag-and-drop while editing a gallery. There are workarounds using the List View and the arrows on the toolbar for editing individual images in a post, but the ability to drag-and-drop in "Edit Gallery" is a desired feature.

Change History (36)

#1 @hellofromTonya
16 months ago

  • Milestone changed from Awaiting Review to 5.9.1

Hello @linux4me2,

Welcome back to WordPress Core's Trac! Thank you for opening this ticket and for providing clear steps to reproduce!

This issue was first reported in the support forum https://wordpress.org/support/topic/reorder-gallery-images-in-5-9-rc3. I can confirm that drop-and-drag within the modal screen is not working in 5.9 but does in 5.8.3.

Moving this into 5.9.1 for future investigation.

#2 @hellofromTonya
16 months ago

  • Keywords has-testing-info added

#3 @Clorith
16 months ago

  • Component changed from Media to External Libraries
  • Focuses javascript added

This is caused by a regression in the jQuery UI Sortable library, a fix has been released for the library, and will be included in the upcoming release of WordPress 5.9.1

#4 @Howdy_McGee
16 months ago

#54932 was marked as a duplicate.

#5 @Howdy_McGee
16 months ago

On that note, this is the JS error I get when trying to move gallery images via Edit Gallery:

media-views.min.js?ver=5.9:2 Uncaught TypeError: Cannot read properties of undefined (reading 'args')
    at n.<anonymous> (media-views.min.js?ver=5.9:2:23305)
    at u (underscore.min.js?ver=1.13.1:2:16433)

#6 @hellofromTonya
16 months ago

#54935 was marked as a duplicate.

#7 @audrasjb
16 months ago

#54935 was marked as a duplicate.

#8 @hellofromTonya
16 months ago

#54949 was marked as a duplicate.

#9 @ocean90
16 months ago

#54957 was marked as a duplicate.

#10 @ocean90
16 months ago

#54925 was marked as a duplicate.

#11 @Clorith
16 months ago

  • Owner set to Clorith
  • Status changed from new to accepted

This ticket was mentioned in PR #2238 on WordPress/wordpress-develop by Clorith.


16 months ago
#12

  • Keywords has-patch added

This PR updates the bundled files form jQuery UI from version 1.13.0 to 1.13.1

Version 1.13.1 contains fixes for regressions in jQuery compatibility introduced wit hthe 1.13.0 release, as well as some code-styling cleanup (indentation-related for readability).

See the release post at https://blog.jqueryui.com/2022/01/jquery-ui-1-13-1-released/
See the changelog between version 1.13.0 and 1.13.1 at https://github.com/jquery/jquery-ui/compare/1.13.0...1.13.1

Trac ticket: https://core.trac.wordpress.org/ticket/54902

#13 @Clorith
16 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 52648:

External libraries: Update jQuery UI to 1.13.1

Some regressions happened alongside the release of jQuery UI 1.13.0, this brings the fixes from 1.13.1 downstream to WordPress, notably relating to Widget, Autocomplete, Sortable, and Tooltip modules.

See the changelog between version 1.13.0 and 1.13.1 at https://github.com/jquery/jquery-ui/compare/1.13.0...1.13.1

Props blogaid, linux4me2, mgol.
Fixes #54902.

#14 @Clorith
16 months ago

  • Keywords fixed-major added

#15 @SergeyBiryukov
16 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 5.9.1 backport.

#16 @mirosadusek123
16 months ago

After elementor and World Press upgrade the Astra gallery drag and drop to reorder images no longer works!!!

#17 @moietoi
16 months ago

  • Severity changed from normal to major

hi all,
same problem, same consequence.
Do not enable automatic WordPress updates... ;(
Regards

#18 @Clorith
16 months ago

#55031 was marked as a duplicate.

#19 @Clorith
16 months ago

#55032 was marked as a duplicate.

#20 @Clorith
16 months ago

#54927 was marked as a duplicate.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


16 months ago

#22 @zgrkaralar
16 months ago

I test and looks like it's fixed in Trunk.

#23 @peterwilsoncc
16 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

This was merged to the 5.9 branch in [52665] but the commit didn't get linked to the ticket

In 52665

External libraries: Update jQuery UI to 1.13.1

Some regressions happened alongside the release of jQuery UI 1.13.0, this brings the fixes from 1.13.1 downstream to WordPress, notably relating to Widget, Autocomplete, Sortable, and Tooltip modules.

See the changelog between version 1.13.0 and 1.13.1 at https://github.com/jquery/jquery-ui/compare/1.13.0...1.13.1

Props blogaid, linux4me2, mgol, Clorith.
Merges [52648] to the 5.9 branch.
Fixes #54902.

This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.


16 months ago

#25 @glendaviesnz
16 months ago

#55122 was marked as a duplicate.

#26 @glendaviesnz
16 months ago

#55138 was marked as a duplicate.

#27 @Clorith
16 months ago

#55159 was marked as a duplicate.

#28 follow-up: @potatopizza
16 months ago

This is a strange bug, looks to be a layering issue. Here is a method that works. When you first click on the gallery window that brings up the screen of your images to reorder, make sure you don't select an image (no blue selection border around the image), and left click and hold at the top of the image border. This should let you grab the image and reorder them through drag and drop.

Last edited 16 months ago by potatopizza (previous) (diff)

#29 @SergeyBiryukov
16 months ago

#55186 was marked as a duplicate.

#31 @samumray
16 months ago

Only the top of the gallery succeeded.

The bottom is not draggable.

#32 in reply to: ↑ 28 @moietoi
16 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to potatopizza:

This is a strange bug, looks to be a layering issue. Here is a method that works. When you first click on the gallery window that brings up the screen of your images to reorder, make sure you don't select an image (no blue selection border around the image), and left click and hold at the top of the image border. This should let you grab the image and reorder them through drag and drop.

would you be able to show us how you do it on video (screenshot) ? I tried to reproduce it but without success

#33 @audrasjb
16 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Closing this ticket again, since the issue was fixed in this changeset: [52665].

The fix is available in WP 5.9.1 release candidate (test here: https://make.wordpress.org/core/2022/02/16/wordpress-5-9-1-rc-1/).

The final release of WP 5.9.1 is scheduled on Tuesday Feb 22, 2022.

#34 follow-up: @pippo50
15 months ago

Just updated to 5.9.1 but the problem persist. Cleared cache and tried both on Firefox & Chrome to no avail.

#35 in reply to: ↑ 34 @samumray
15 months ago

Replying to pippo50:

Just updated to 5.9.1 but the problem persist. Cleared cache and tried both on Firefox & Chrome to no avail.

We've got the problem solved!
Everything works!

#36 @samumray
15 months ago

Thanks!

#37 @desrosj
11 months ago

#54925 was marked as a duplicate.

Note: See TracTickets for help on using tickets.