Merge pull request #461 from kanaka/bug/459-incorrect-position-with-scrollbars
Make Util.getPosition be relative to page
This commit is contained in:
commit
985d92473e
@ -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};
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user