Drag and Drop not working

Created on 23 September 2024, 3 months ago

Problem/Motivation

Drag and drop icon is being hidden, leaving users unable to perform the drag & drop operation.

Steps to reproduce

On Drupal 10.3.2, configure any entity reference field to use the BERT widget. Add multiple content references and notice how you can't reorder the list.

Proposed resolution

Don't explicitly hide the first cell unless configured to do so.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇧🇷Brazil halth Brazil

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

Merge Requests

Comments & Activities

  • Issue created by @halth
  • 🇧🇷Brazil halth Brazil

    Okay. I'm seeing it's a conflict with the Gin admin theme... 🫠

    Gin wraps the main table with a .gin-table-scroll-wrapper element, breaking the following CSS selector:

    .field--widget-bert .tabledrag-toggle-weight-wrapper ~ table thead th:first-of-type,
    .field--widget-bert .tabledrag-toggle-weight-wrapper ~ table tbody td:first-of-type {
      display: table-cell;
    }
    

    In case the maintainer feels like it's worth supporting Gin (for it's a widely adopted admin theme), I've submitted a PR with the updated selector.

  • Merge request !10Added Gin support for the drag & drop feature. → (Open) created by halth
  • 🇧🇷Brazil halth Brazil
Production build 0.71.5 2024