Missing drag event when starting to drag a row in tabledrag

Created on 24 March 2020, over 4 years ago
Updated 14 January 2024, 8 months ago

When using tabledrag.js, I noticed an API regression compared to the 7.x version of tabledrag.

In D7 the Drupal.tableDrag.prototype.onDrag method is called at the end of the event handler when starting dragging. In D8 the event handler calls Drupal.tableDrag.prototype.dragStart but doesn't call Drupal.tableDrag.prototype.onDrag, neither at the end of the event handler, nor at the end of the dragStart method.

I use this to mark a draggable table as being in drag mode to add some visual clues.
Interestingly the Drupal.tableDrag.prototype.onDrop method is called correctly each time a drag is finished.

I consider this a regression, because the effect is that developers can easily add code for the drop event , but not for the drag event. Couldn't find any change notice on this either.

🐛 Bug report
Status

Closed: outdated

Version

9.5

Component
Javascript 

Last updated 1 day ago

Created by

🇩🇪Germany berliner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • Status changed to Closed: outdated 8 months ago
  • 🇩🇪Germany berliner

    This seems to have been fixed in the meantime.

Production build 0.71.5 2024