Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit a8537e6

Browse files
fix(backdrop): use fixed position for global backdrops.
Set backdrop `position:fixed` when the parent is BODY to give it a position based off the body viewport. Closes #2831.
1 parent 36aa6bc commit a8537e6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/backdrop/backdrop.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ angular
4848
// so let's wait until $animate is done...
4949
var parent = element.parent()[0];
5050
if (parent) {
51+
52+
if ( parent.nodeName == 'BODY' ) {
53+
element.css({position : 'fixed'});
54+
}
55+
5156
var styles = $window.getComputedStyle(parent);
5257
if (styles.position == 'static') {
5358
// backdrop uses position:absolute and will not work properly with parent position:static (default)

0 commit comments

Comments
 (0)