My modal contains an image-link with an overlapping close button. Unfortunately, the close button is not receiving focus - instead, the link is being clicked. I've made some adjustments but can't seem to get the close button focused while maintaining the functionality of the full image link. Any guidance on how to achieve this would be appreciated.
$("#adModalLarge").modal("show");
.modal-full .close {
position: absolute;
top: 5px;
right: 25px;
font-size: 60px;
font-weight: bolder;
transition: 0.3s;
z-index: 9!important;
opacity: 0.6;
}
.modal-lg .close {
position: absolute;
top: 5px;
right: 25px;
font-size: 40px;
font-weight: bolder;
transition: 0.3s;
z-index: 9!important;
opacity: 0.6;
}
.close:hover,
.close:focus {
opacity: 0.9!important;
text-decoration: none;
cursor: pointer;
}
.viewindex {
z-index: 999999999!important
}
.modal-full {
width: 100% !important;
height: 100% !important;
min-width: 100% !important;
min-height: 100% !important;
max-width: 100% !important;
max-height: 100% !important;
padding: 0 !important;
margin: 0;
}
.modal-full .modal-content {
height: 100% !important;
min-height: 100% !important;
max-height: 100% !important;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<div aria-hidden="true" aria-labelledby="adModalLargeLabel" class="modal fade pl-0 viewindex" id="adModalLarge" role="dialog" tabindex="-1">
<div class="modal-dialog modal-full" role="document">
<span class="close" data-dismiss="modal">×</span>
<a href="https://www.example2.com" target="_blank"><img src="https://www.insaid.co/wp-content/uploads/2019/10/2-1.png" alt="" class="modal-content"></a>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>