Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Drag and drop plugin inside a modal

robin.van.straeten@itecequipment.com priority asked 10 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 10 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 10 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