Topic: Don't work "stepper" in "modal"

Bartev Pavel free asked 2 years ago


Colleague want to use Stepper in Modal window, does not work.

modal.js:340 Uncaught TypeError: Cannot read property 'classList' of undefined at r.value (modal.js:340) at r.value (modal.js:211) at new r (modal.js:88) at r. (mdb.min.js:316) at new r (modal.js:81) at HTMLButtonElement. (modal.js:352) at HTMLDocument.e (event-handler.js:119)

    <div class="modal fade" id="reviews" tabindex="-1" aria-labelledby="reviewsLabel" aria-hidden="true">
        <div class="modal-dialog modal-dialog-scrollable modal-lg">
            <div class="modal-content">
                <div class="modal-header p-2 px-3 bg-info">
                    <h5 class="modal-title" id="exampleModalLabel">Отзывы</h5>
                    <button type="button" class="btn-close" data-mdb-dismiss="modal" aria-label="Close"></button>
                </div>

                <div class="modal-body p-2">

                <ul class="stepper" data-mdb-stepper="stepper">
      <li class="stepper-step stepper-active">
        <div class="stepper-head">
          <span class="stepper-head-icon"> 1 </span>
          <span class="stepper-head-text"> step1 </span>
        </div>
        <div class="stepper-content py-3">
         1
        </div>
      </li>
      <li class="stepper-step">
        <div class="stepper-head">
          <span class="stepper-head-icon"> 2 </span>
          <span class="stepper-head-text"> step2 </span>
        </div>
        <div class="stepper-content py-3">
         2
        </div>
      </li>
      <li class="stepper-step">
        <div class="stepper-head">
          <span class="stepper-head-icon"> 3 </span>
          <span class="stepper-head-text"> step3 </span>
        </div>
        <div class="stepper-content py-3">
 3
        </div>
      </li>
    </ul>

                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-mdb-dismiss="modal">Закрыть</button>
                </div>
        </div>
      </div>
    </div>

Bartev Pavel free answered 2 years ago


I don't have this error if use FREE JS (/js/free/mdb.min.js), only /js/mdb.min.js, it in "modal" block

SOL:


FREE CONSULTATION

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

Status

Closed

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.8.0
  • Device: x64
  • Browser: Сhrome
  • OS: Win, Android
  • Provided sample code: No
  • Provided link: No