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

Commit d64f4a9

Browse files
scamdenpkozlowski-opensource
authored andcommitted
fix(modal): put backdrop in before window
Closes #1313
1 parent 8b1ab79 commit d64f4a9

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/modal/modal.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,13 @@ angular.module('ui.bootstrap.modal', [])
166166
backdrop: modal.backdrop,
167167
keyboard: modal.keyboard
168168
});
169-
169+
170+
if (backdropIndex() >= 0 && !backdropDomEl) {
171+
backdropjqLiteEl = angular.element('<div modal-backdrop></div>');
172+
backdropDomEl = $compile(backdropjqLiteEl)(backdropScope);
173+
body.append(backdropDomEl);
174+
}
175+
170176
var angularDomEl = angular.element('<div modal-window></div>');
171177
angularDomEl.attr('window-class', modal.windowClass);
172178
angularDomEl.attr('index', openedWindows.length() - 1);
@@ -175,12 +181,7 @@ angular.module('ui.bootstrap.modal', [])
175181
var modalDomEl = $compile(angularDomEl)(modal.scope);
176182
openedWindows.top().value.modalDomEl = modalDomEl;
177183
body.append(modalDomEl);
178-
179-
if (backdropIndex() >= 0 && !backdropDomEl) {
180-
backdropjqLiteEl = angular.element('<div modal-backdrop></div>');
181-
backdropDomEl = $compile(backdropjqLiteEl)(backdropScope);
182-
body.append(backdropDomEl);
183-
}
184+
184185
};
185186

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

0 commit comments

Comments
 (0)