Merge pull request #461 from kanaka/bug/459-incorrect-position-with-scrollbars

Make Util.getPosition be relative to page
This commit is contained in:
Solly 2015-02-27 14:11:46 -05:00
commit 985d92473e

View File

@ -436,7 +436,7 @@ Util.load_scripts = function (files) {
Util.getPosition = function(obj) {
"use strict";
var objPosition = obj.getBoundingClientRect();
return {'x': objPosition.left, 'y': objPosition.top};
return {'x': objPosition.left + window.pageXOffset, 'y': objPosition.top + window.pageYOffset};
};