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

fix(modal): put backdrop in before window #1313

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/modal/modal.js
Original file line number Diff line number Diff line change
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