fixed
I added windowTemplateUrl to the $modal.open({..}) options object $modal.open({..})
which overrides the modal main window: https://github.com/angular-ui/bootstrap/blob/master/template/modal/window.html
so open source looks like this:
var modalInstance = $modal.open({ templateUrl: 'myModalContent.html', controller: 'ModalInstanceCtrl', windowTemplateUrl: 'modalWindowTemplte.html' ... });
and the override pattern is now forced to include div.modal-backdrop
<script type="text/ng-template" id="modalWindowTemplte.html"> <div tabindex="-1" role="dialog" class="modal fade" ng-class="{in: animate}" ng-style="{'z-index': 1050 + index*10, display: 'block'}"> <div class="modal-backdrop fade in"></div> <div class="modal-dialog" ng-class="{'modal-sm': size == 'sm', 'modal-lg': size == 'lg'}"><div class="modal-content" modal-transclude></div></div> </div> </script>
source share