bootstrap-4android-webviewjquery-3jquery-migratebootstrap-dialog

BootstrapDailog is not working in Bootstrap4 with Jquery 3.3.1


I am using BootstrapDialog with Bootstrap4 and Jquery3.3.1 when i call BootstrapDialog.confirm then it will throw an error "Uncaught TypeError: Object.keys called on non-object" in older version of chrome .I also added Jquery-migrate3.0.0 but didn't work.But BootstrapDialog is works fine with Bootstrap3 and jquery-2.2.3


Solution

  • Bootstrap 4 Dialog or Modals have been little weird. But try this solution and hope it works for you.

        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalCenter">
      Launch demo modal
    </button>
    
    <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
      <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title" id="exampleModalCenterTitle">Modal title</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            ...
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
            <button type="button" class="btn btn-primary">Save changes</button>
          </div>
        </div>
      </div>
    </div>