I can confirm this. A quick and dirty solution for the moment is to go to ~wp-admin/widgets-form.php and find wp_enqueue_script( 'admin-widgets' ); at about line 26.
Then insert this line immediately above it: wp_enqueue_script( 'jquery-ui-sortable' );
When I find the file that actually performs the drag and drop, we can work out a longer term solution.
OK, I’ve found the file that performs the sorting in the gallery widget. It is not, as I would have expected, in the JS for the gallery widget itself but is embedded in the ~wp-includes/js/media-views.js file.
It doesn’t make sense for us to edit that file now, and nor does it make sense to write some code to use SortableJS to replace it right now because I am hoping to work (from February onwards) on replacing all the JavaScript that the media widgets (image, audio, video, and gallery) use. Now that I know of this issue, I can incorporate SortableJS to work on the gallery widget then.
For now, I’ll open a PR to make the fix I gave above so that we can get the sorting working again with the next CP update, because I would expect that my work on the widgets won’t be ready in time for CP 2.4.0 (though I’d love it to be done in time for 2.5.0).
I would be delighted if someone else took on this task! But I am the one who’s re-written the media grid view, the Custom HTML widget, and half of the Text widget, and all the stuff with SortableJS, so I was just expecting that it would be me who’d do the rest of this work on the widgets.
You won’t need to re-write anything. ClassicPress uses semantic versioning, so when we release v. 2.4.0 or 2.5.0, there will be no breaking changes (other than unintended bugs, of course). So, if you’re using the built-in Gallery widget, it should still work the same. And there will be plenty of opportunity to test it all before we release it.
The only way you’d need to re-write anything is if you have written some custom code that uses the jQuery Sortable module and want to switch to SortableJS. But you won’t be forced to switch. As long as you explicitly call jquery-ui-sortable in your code, whatever you have written will still work. This is what I mean about CP not creating breaking changes. While core will no longer use that module, it will still be bundled with ClassicPress until at least version 3.0.0.
That’s fine. Any updates we make to CP shouldn’t affect that until we get to version 3.0.0 at the earliest.
We are working on replacing all of the backbone.js-based approach for media files (as we have done in the media grid view, for example), but that just means that (until v 3.0.0) we write new code and don’t use the old code. But the old code will still be there for you to make use of as you like.