Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
fix(modal): insert backdrop before modal window
Browse files Browse the repository at this point in the history
  • Loading branch information
scamden authored and pkozlowski-opensource committed Aug 25, 2013
1 parent 21d2ecb commit d870f21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,14 @@ angular.module('ui.bootstrap.modal', [])
$modalStack.open = function (modalInstance, modal) {

var backdropDomEl;
var modalDomEl = $compile(angular.element('<modal-window>').html(modal.content))(modal.scope);
body.append(modalDomEl);

if (modal.backdrop) {
backdropDomEl = $compile(angular.element('<modal-backdrop>'))($rootScope);
body.append(backdropDomEl);
}
var modalDomEl = $compile(angular.element('<modal-window>').html(modal.content))(modal.scope);
body.append(modalDomEl);



openedWindows.add(modalInstance, {
deferred: modal.deferred,
Expand Down

0 comments on commit d870f21

Please sign in to comment.