diff --git a/src/position/position.js b/src/position/position.js index bfda14711b..727a85e85d 100644 --- a/src/position/position.js +++ b/src/position/position.js @@ -57,8 +57,8 @@ angular.module('ui.bootstrap.position', []) var offsetParentEl = parentOffsetEl(element[0]); if (offsetParentEl != $document[0]) { offsetParentBCR = this.offset(angular.element(offsetParentEl)); - offsetParentBCR.top += offsetParentEl.clientTop; - offsetParentBCR.left += offsetParentEl.clientLeft; + offsetParentBCR.top += offsetParentEl.clientTop - offsetParentEl.scrollTop; + offsetParentBCR.left += offsetParentEl.clientLeft - offsetParentEl.scrollLeft; } return { diff --git a/src/position/test/test.html b/src/position/test/test.html index 5076e9b30c..0ea75acc6a 100644 --- a/src/position/test/test.html +++ b/src/position/test/test.html @@ -71,6 +71,16 @@