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

Commit

Permalink
fix(modal): put backdrop in before window
Browse files Browse the repository at this point in the history
Closes #1313
  • Loading branch information
scamden authored and pkozlowski-opensource committed Nov 29, 2013
1 parent 8b1ab79 commit d64f4a9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/modal/modal.js
Expand Up @@ -166,7 +166,13 @@ angular.module('ui.bootstrap.modal', [])
backdrop: modal.backdrop,
keyboard: modal.keyboard
});


if (backdropIndex() >= 0 && !backdropDomEl) {
backdropjqLiteEl = angular.element('<div modal-backdrop></div>');
backdropDomEl = $compile(backdropjqLiteEl)(backdropScope);
body.append(backdropDomEl);
}

var angularDomEl = angular.element('<div modal-window></div>');
angularDomEl.attr('window-class', modal.windowClass);
angularDomEl.attr('index', openedWindows.length() - 1);
Expand All @@ -175,12 +181,7 @@ angular.module('ui.bootstrap.modal', [])
var modalDomEl = $compile(angularDomEl)(modal.scope);
openedWindows.top().value.modalDomEl = modalDomEl;
body.append(modalDomEl);

if (backdropIndex() >= 0 && !backdropDomEl) {
backdropjqLiteEl = angular.element('<div modal-backdrop></div>');
backdropDomEl = $compile(backdropjqLiteEl)(backdropScope);
body.append(backdropDomEl);
}

};

$modalStack.close = function (modalInstance, result) {
Expand Down

0 comments on commit d64f4a9

Please sign in to comment.