Topic: How to hide static modal?

vgs pro asked 3 years ago


Hello, I have a static modal, which I use as a full-screen busy indicator which cannot be removed by escape or clicking:

<div
  class="modal fade"
  id="fullScreenLoader"
  data-mdb-backdrop="static"
  data-mdb-keyboard="false"
  tabindex="-1"
  aria-hidden="true">
</div>

Showing it with:

$('#fullScreenLoader').modal();

works.

But how to hide it again away via JS?. Neither hide(), nor dismiss(), nor modal('hide') works?

Thank you!


vgs pro answered 3 years ago


Hi,

I use MDB jquery, not MDB5. But as told, I solved the problem just be leaving out the "fade" option. Of course a fade would be nice, but its not a must-have.

Best regards, Vasilios


Grzegorz Bujański staff answered 3 years ago


Do you use MDB Jquery as you selected when creating this post or MDB5?


vgs pro answered 3 years ago


Addition: Also with the new attributes, it SOMETIMES occured. But its solved now, the real reason was:

class="modal fade"

Using

class="modal"

I cannot reproduce the issue. This seems to be a bug in BS4, see https://stackoverflow.com/questions/23677765/bootstrap-modal-hide-is-not-working



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: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.2
  • Device: .
  • Browser: .
  • OS: .
  • Provided sample code: No
  • Provided link: No