diff --git a/src/position/position.js b/src/position/position.js index d796b6a79f..67ee4b422a 100644 --- a/src/position/position.js +++ b/src/position/position.js @@ -72,8 +72,8 @@ angular.module('ui.bootstrap.position', []) return { width: boundingClientRect.width || element.prop('offsetWidth'), height: boundingClientRect.height || element.prop('offsetHeight'), - top: boundingClientRect.top + ($window.pageYOffset || $document[0].body.scrollTop || $document[0].documentElement.scrollTop), - left: boundingClientRect.left + ($window.pageXOffset || $document[0].body.scrollLeft || $document[0].documentElement.scrollLeft) + top: boundingClientRect.top + ($window.pageYOffset || $document[0].documentElement.scrollTop), + left: boundingClientRect.left + ($window.pageXOffset || $document[0].documentElement.scrollLeft) }; } };