Modal reopens after closing #491
Labels
help wanted
User is requesting help with how to use the library
needs more info
User needs to provide more information before we can debug further
I have a modal opening on page load. When i click the trigger button to close it closes then immediately reopens.
Am I missing something here?
My js code:
`import MicroModal from "micromodal";
document.addEventListener("DOMContentLoaded", function () {
MicroModal.init({
closeTrigger: "data-micromodal-close",
});
MicroModal.show("legal-disclaimer");
MicroModal.close("legal-disclaimer");
});
`
The text was updated successfully, but these errors were encountered: