From d870f212970cd5677e363cce888f1605a44cba4d Mon Sep 17 00:00:00 2001 From: Sterling Camden Date: Sat, 24 Aug 2013 17:27:32 -0700 Subject: [PATCH] fix(modal): insert backdrop before modal window --- src/modal/modal.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modal/modal.js b/src/modal/modal.js index 11a5424152..1ce073dbd2 100644 --- a/src/modal/modal.js +++ b/src/modal/modal.js @@ -134,13 +134,14 @@ angular.module('ui.bootstrap.modal', []) $modalStack.open = function (modalInstance, modal) { var backdropDomEl; - var modalDomEl = $compile(angular.element('').html(modal.content))(modal.scope); - body.append(modalDomEl); - if (modal.backdrop) { backdropDomEl = $compile(angular.element(''))($rootScope); body.append(backdropDomEl); } + var modalDomEl = $compile(angular.element('').html(modal.content))(modal.scope); + body.append(modalDomEl); + + openedWindows.add(modalInstance, { deferred: modal.deferred,