Topic: Drag and drop plugin inside a modal

robin.van.straeten@itecequipment.com priority asked 9 months ago


Expected behavior

I was trying to create some draggable components inside a modal.

Actual behavior

When picking up an item the item being dragged is displayed behind the modal.

Resources (screenshots, code snippets etc.)

I was using the code from the examples. Changing the z-index does not seem to give correct behavior.

<div data-mdb-sortable-init class="sortable-list">
  <div class="sortable-item">Item 1</div>
  <div class="sortable-item">Item 2</div>
  <div class="sortable-item">Item 3</div>
  <div class="sortable-item">Item 4</div>
  <div class="sortable-item">Item 5</div>
</div>

Grzegorz Bujański staff answered 9 months ago


I am unable to reproduce this error: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/5950095#html-tab-view

Have you set some custom z-index for the modal?


robin.van.straeten@itecequipment.com priority commented 9 months ago

Apparently, the all.min.css file wasn't being loaded properly, causing issues. Thanks for the snippet, it helped me resolve my problem.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 7.1.0
  • Device: Laptop
  • Browser: Firefox
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No