Skip to content

fix: keep sortable row drags inside the table - #283

Merged
hellopablo merged 1 commit into
developfrom
feature/sortable-drag-preview
Oct 5, 2026
Merged

hellopablo merged 1 commit into
developfrom
feature/sortable-drag-preview

Conversation

@hellopablo

Copy link
Copy Markdown
Member

Summary

  • Replace the jQuery UI sortable used by .js-admin-sortable with a pointer-event drag, so a table row never leaves its table.
  • The dragged row stays a solid copy under the same parent as the table, which keeps styles that are scoped to that table. A dashed slot marks where it will land, and dropping still writes .js-admin-sortable__order.
  • Select2 choice lists are unchanged and still use jQuery UI.

Test plan

  • Hard-refresh an admin page that uses a sortable table, then drag a row by its handle.
  • Confirm the copy stays styled, text is not selected while dragging, and the dashed slot stays in the table.
  • Drop the row and confirm the order inputs are rewritten to the new indexes.
  • Add and remove a dynamic-table row and confirm sorting still works on the new row.
  • Confirm a select2 choice list can still be reordered.

jQuery UI's helper left the table, so the preview lost its styles and could not stay in the tbody. Drag a solid copy of the row and leave a dashed slot behind it.
@hellopablo
hellopablo merged commit 0c3314c into develop Oct 5, 2026
1 of 5 checks passed
@hellopablo
hellopablo deleted the feature/sortable-drag-preview branch October 5, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant