I am attempting to create a modal-dialog that opens on the button click. However, when I do this the modal-dialog opens being the modal-backdrop and the screen becomes grey and unclickable. This also results in the dialog being under the header of the site.
I am currently using to Laravel Spark framework, however I believe this should be universal for all. This is my HTML.
<spark-tokens :tokens="tokens" :available-abilities="availableAbilities" inline-template>
<div>
<div>
...
<button class="btn btn-danger-outline" @click="approveTokenDelete(token)">
<i class="fa fa-times"></i>
</button>
...
</div>
...
<!-- Delete Token Modal -->
<div class="modal fade" id="modal-delete-token" tabindex="-1" role="dialog">
<div class="modal-dialog" v-if="deletingToken">
<div class="modal-content">
...
</div>
</div>
</div>
</div>
</spark-tokens>
This is the JS that I am using to open the modal.
module.exports = {
...
methods: {
...
/**
* Get user confirmation that the token should be deleted.
*/
approveTokenDelete(token) {
this.deletingToken = token;
$('#modal-delete-token').modal('show');
},
...
}
};
I have seen problems similar to this being asked but none of the solutions have worked for me. I have tried moving the "modal fade" div outside of it's encompassing div (so right about the tag). This caused the dialog to not show up at all. I have attempted to change the z-index of modal-backdrop, however, I cannot find the correct file to change this in. Is there another solution to this problem? Any help you all can provide will be greatly appreciated. Thank you!