Problem/Motivation
The items in a tabledrag (menu, taxonomy, etc) are shifted up and not vertically centered with the drag handle.

Looking at the HTML, I see that the handle in 11.0.11 went from
<a href="#" title="Move in any direction" class="tabledrag-handle js-tabledrag-handle"></a>
to this in 11.1.0
<a href="#" title="Move in any direction" class="tabledrag-handle"><div class="handle"></div></a>
which seems to indicate that it's coming from /core/misc/tabledrag.js instead of /core/themes/claro/js/tabledrag.js
The "Show row weights" link was also affected in a similar way.

I suspect it has something to do with the recent changes is asset order: https://www.drupal.org/node/3473558
Steps to reproduce
Go to any form with a tabledrag element: /admin/structure/menu/manage/admin or /admin/structure/block or /admin/config/content/formats/manage/basic_html
Notice that the drag handle and text are not aligned and "Show row weights" is a blue text link.
Proposed resolution
Change claro's tabledrag.js weight to -1
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | after mr13023.png | 21.95 KB | bwaindwain |
| #15 | before mr13023.png | 21.97 KB | bwaindwain |
| #12 | Screenshot 2025-08-18 at 9.56.47 am.png | 22.4 KB | cb_govcms |
| #8 | After.png | 191.55 KB | rinku jacob 13 |
| #8 | Before.png | 184.28 KB | rinku jacob 13 |
Issue fork drupal-3506870
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
quietone commentedChanges are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies.
Comment #3
bwaindwain commentedComment #4
bwaindwain commentedI was able to fix this by changing web/core/core.libraries/yml from
misc/tabledrag.js: { weight: -1 }to
misc/tabledrag.js: { }which was inspired by https://www.drupal.org/project/drupal/issues/1945262
Comment #5
bwaindwain commentedComment #7
bwaindwain commentedcreated mr
Comment #8
rinku jacob 13 commented@bwaindwain, I have reviewed and tested your MR on Drupal 11.x-dev, and it was successful in removing the table drag weights from core.libraries.yml. Additionally, I can see the changes reflected in the UI, including the alignment table drag functionality. The row weights link has also been updated as expected.Thanks @bwaindwain
Comment #9
smustgrave commentedCaused a number of failures. Not 100% sure about the solution as this could have some impact on custom/contrib modules not just this core issue.
Also summary still needs some love.
Comment #12
cb_govcms commentedHave also experienced this in Drupal 10, as mentioned stemming from the change in asset loading introduced in 10.4.
On some settings (such as Diff module) the icon is not just aligned oddly but causes wrapping issues:

In my testing this issue was only present when the Big Pipe module was enabled, rendering as expected otherwise.
Rather than modifying the core library I suggest changing the weight in Claro in new MR.
Comment #13
cb_govcms commentedComment #14
smustgrave commentedNot sure we can add tests for this but IS should be complete. Should always have proposed solution filled out, if multiple MRs can we close or hide ones that don't apply, and with UI bug before/after screenshots will help reviews
Thanks!
Comment #15
bwaindwain commentedThanks @cb_govcms. MR !13023 works for me, and the tests pass. +1 RTBC
Before MR !13023

After MR !13023

Comment #16
bwaindwain commentedComment #18
smustgrave commentedConfirmed this does fix the problem, we were seeing this on the book module too.
Comment #19
longwaveBackporting down to 10.5.x as a minor bug fix to the UI; I can't see that changing the weights will have any other side effects so this feels safe to me.
Committed and pushed ddb2a37d818 to 11.x and 66f35ad8f6e to 11.3.x and 19d511dc3c6 to 11.2.x and 0872ca1c512 to 10.6.x and 7bde88e3662 to 10.5.x. Thanks!