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

Commit 9aecd4e

Browse files
Romain Laï-Kingpkozlowski-opensource
Romain Laï-King
authored andcommitted
fix(position): fallback for IE8's scrollTop/Left for offset
1 parent 5f9e270 commit 9aecd4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/position/position.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ angular.module('ui.bootstrap.position', [])
7171
return {
7272
width: element.prop('offsetWidth'),
7373
height: element.prop('offsetHeight'),
74-
top: boundingClientRect.top + ($window.pageYOffset || $document[0].body.scrollTop),
75-
left: boundingClientRect.left + ($window.pageXOffset || $document[0].body.scrollLeft)
74+
top: boundingClientRect.top + ($window.pageYOffset || $document[0].body.scrollTop || $document[0].documentElement.scrollTop),
75+
left: boundingClientRect.left + ($window.pageXOffset || $document[0].body.scrollLeft || $document[0].documentElement.scrollLeft)
7676
};
7777
}
7878
};

0 commit comments

Comments
 (0)