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

Commit dd415a9

Browse files
tritonrcpkozlowski-opensource
authored andcommittedDec 20, 2013
fix(modal): Grab reference to body when it is needed in lieu of when the factory is created
1 parent 2db1ba5 commit dd415a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/modal/modal.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ angular.module('ui.bootstrap.modal', [])
106106

107107
var backdropjqLiteEl, backdropDomEl;
108108
var backdropScope = $rootScope.$new(true);
109-
var body = $document.find('body').eq(0);
110109
var openedWindows = $$stackedMap.createNew();
111110
var $modalStack = {};
112111

@@ -166,7 +165,9 @@ angular.module('ui.bootstrap.modal', [])
166165
backdrop: modal.backdrop,
167166
keyboard: modal.keyboard
168167
});
169-
168+
169+
var body = $document.find('body').eq(0);
170+
170171
if (backdropIndex() >= 0 && !backdropDomEl) {
171172
backdropjqLiteEl = angular.element('<div modal-backdrop></div>');
172173
backdropDomEl = $compile(backdropjqLiteEl)(backdropScope);

0 commit comments

Comments
 (0)